Big Data Interview Questions Hundred Days Update_Hadoop Topics (Day02)

2. When HDFS is reading a file, what if one of the blocks is suddenly damaged?

After the client reads the block on the DataNode, it will perform checksum verification, that is, verify the block read locally by the client with the original block on HDFS. If the verification result is found to be inconsistent, the client will notify the NameNode, and then Continue reading from the next DataNode that has a copy of the block

3. What to do if one of the DataNodes suddenly hangs when HDFS is uploading files

When the client uploads a file, it establishes a pipeline with the DataNode. The forward direction of the pipeline is the data packet sent by the client to the DataNode, and the reverse direction of the pipeline is the DataNode sends an ack confirmation to the client, that is, after the data packet is correctly received, it sends an acknowledged receipt. When the DataNode suddenly hangs, the client cannot receive the ack confirmation sent by the DataNode. The client will notify the NameNode. The NameNode will check that the copy of the block does not match the specified one. The NameNode will notify the DataNode to replicate the copy and hang up. The dropped DataNode is processed offline, and it is no longer involved in file upload and download.

Guess you like

Origin blog.csdn.net/xianyu120/article/details/115045427