天天看點

HDFS daily maintenance,, useful command

Hadoop version: Hadoop 2.2.0.2.0.6.0-0009

1.datanode report

cmd>%hadoop_home%/bin/hdfs dfsadmin -report
           

2.datanode balancer

cmd>%hadoop_home%/bin/hdfs balancer -threshold 5 -policy datanode
           

3. Refresh datanodes --- Re-read the hosts and exclude files to update the set of Datanodes that are allowed to connect to the Namenode and those that should be decommissioned or recommissioned.

cmd>%hadoop_home%/bin/hdfs dfsadmin -refresh<strong>N</strong>
           

繼續閱讀