1.hadoop fs == hdfs dfs
hadoop fs -ls /
hadoop fs -lsr
hadoop fs -mkdir /user/hadoop
hadoop fs -put a.txt /user/hadoop/
hadoop fs -get /user/hadoop/a.txt /
hadoop fs -cp src dst
hadoop fs -mv src dst
hadoop fs -cat /user/hadoop/a.txt
hadoop fs -rm /user/hadoop/a.txt
hadoop fs -rmr /user/hadoop
hadoop fs -text /user/hadoop/a.txt
hadoop fs -copyFromLocal localsrc dst 与hadoop fs -put功能类似
hadoop fs -moveFromLocal localsrc dst 将本地文件上传到hdfs, 同时删除本地文件
2.hdfs dfsadmin
hdfs dfsadmin -report
hdfs dfsadmin -safemode enter | leave | get | wait
hdfs dfsadmin -setBalancerBandwidth 1000
3.hadoop fsck
4.start-balancer.sh
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31496956/viewspace-2199366/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/31496956/viewspace-2199366/