hadoop
distcp
version
:版本号fs
:由hdfs dfs
代替job
:由mapred job
代替fsck
:由hdfs fsck
代替balancer
:由hdfs balancer
代替datanode
:由hdfs datanode
代替namenode
:由hdfs namenode
代替dfsadmin
:由hdfs dfsadmin
代替secondarynamenode
:由hdfs secondarynamenode
代替
1 | hadoop version |
hdfs
dfs
fsck
dfsadmin
datanode
balancer
dfs
以下例子中 /hdfs、hdfs://xx 为hdfs文件系统路,/tmp为本地文件系统路径
1 | hdfs dfs -ls -h /hdfs/a hdfs://10.0.0.1:8020/hdfs |
fsck
-delete
:删除损坏的文件-move
:移动损坏的文件到/lost+found目录-files
:打印被诊断的文件-files -blocks
:打印被诊断的文件的块信息-files -blocks -locations
:打印每个块的位置信息-files -blocks -racks
:打印数据块的网络拓扑结构-includeSnapshots
:如果给定的路径包含快照的路径或者快照在该路径下,则包含快照的数据-list-corruptfileblocks
:打印丢失的块列表以及块所属的文件-openforwrite
:打印正在被写入的文件
1 | hdfs fsck /hdfs |
dfsadmin
-safemode enter|leave|get|wait
:安全模式维护命令-setBalancerBandwidth
:设置数据均衡的速度-report [-live] [-dead] [-decommissioning]
:报告文件系统的信息和统计,其他的选项可以用来过滤节点-printTopology
:打印哪些有在Namenode报告的节点的网络拓扑结构
1 | hdfs dfsadmin -safemode get |
datanode
balancer
-threshold
:默认均衡的阀值-policy
:-include -f host1,host2
:指定datanode-exclude -f host3,host4
:排除
1 | hdfs balancer -threshold 1 -policy datanode |
getconf
1 | hdfs getconf -namenodes |
oev
hadoop edit文件离线查看器
oiv
hadoop image文件查看器
yarn
application
applicationattempt
container
logs
node
application
-list
:从RM查看application列表-kill <AppId>
:杀死application-status <AppId>
:打印指定application状态-appTypes <Types>
:与-list一起使用,基于传入的逗号分隔的application types列表过滤-appStates <States>
:与-list一起,可取ALL, NEW, NEW_SAVING, SUBMITTED, ACCEPTED, RUNNING, FINISHED, FAILED, KILLED,可多个用逗号隔开
1 | yarn application -list |
applicationattempt
1 | yarn applicationattempt -list application_1530168666576_3446336 |
container
1 | yarn container -list appattempt_1501040274955_1945_000001 |
logs
1 | yarn logs -applicationId application_1491808105321_22924 [-appOwner hadoop] |
node
1 | yarn node -list |
mapred
1 | mapred job -list |
相关文章
https://blog.csdn.net/qianshangding0708/article/details/47423585