HDFS Administration
Also available as:
PDF
loading table of contents...

Step 4: Block Move Execution

The HDFS Balancer dispatches a scheduled block move by invoking the DataTransferProtocol .replaceBlock(..) method to the target datanode. It specifies the proxy, and the source as delete-hint in the method call. The target datanode copies the replica directly from the proxy to its local storage. When the copying process has been completed, the target datanode reports the new replica to the Namenode with the delete-hint. Namenode uses the delete-hint to delete the extra replica, that is, delete the replica stored in the source.

After all block moves are dispatched, the HDFS Balancer waits until all the moves are completed. Then, the HDFS Balancer continues running a new iteration and repeats all of the steps. If the scheduled moves fail for 5 consecutive iterations, the HDFS Balancer terminates with a NO_MOVE_PROGRESS exit status.