43.Your cluster has the following characteristics:
A rack aware topology is configured and on
Replication is set to 3
Cluster block size is set to 64MB
?Which describes the file read process when a client application connects into the cluster and requests a 50MB file
A. The client queries the NameNode for the locations of the block, and reads all three copies. The first copy to complete transfer to the client is the one the client reads as part of hadoop’s speculative execution framework.
B. The client queries the NameNode for the locations of the block, and reads from the first location in the list it receives.
C. The client queries the NameNode for the locations of the block, and reads from a random location in the list it receives to eliminate network I/O loads by balancing which nodes it retrieves data from any given time.
D. The client queries the NameNode which retrieves the block from the nearest DataNode to the client then passes that block back to the client.
Answer: B
reference:
http://www.aosabook.org/en/hdfs.html
When an application reads a file, the HDFS client first asks the NameNode for the list of DataNodes that host replicas of the blocks of the file. The list is sorted by the network topology distance from the client. The client contacts a DataNode directly and requests the transfer of the desired block.
When a client writes, it first asks the NameNode to choose DataNodes to host replicas of the first block of the file. The client organizes a pipeline from node-to-node and sends the data. When the first block is filled, the client requests new DataNodes to be chosen to host replicas of the next block. A new pipeline is organized, and the client sends the further bytes of the file.