hdfs dfsadmin

bin/hdfs dfsadmin

管理HDFS

Hagrid01@Hagrid01:[/Hagrid/hadoop-2.6.2]bin/hdfs dfsadmin
Usage: hdfs dfsadmin
Note: Administrative commands can only be run as the HDFS superuser.
        **[-report [-live] [-dead] [-decommissioning]] 报告集群的状况**
        [-safemode <enter | leave | get | wait>]
        [-saveNamespace]
        [-rollEdits]
        [-restoreFailedStorage true|false|check]
        [-refreshNodes]
        [-setQuota <quota> <dirname>...<dirname>]
        [-clrQuota <dirname>...<dirname>]
        [-setSpaceQuota <quota> <dirname>...<dirname>]
        [-clrSpaceQuota <dirname>...<dirname>]
        [-finalizeUpgrade]
        [-rollingUpgrade [<query|prepare|finalize>]]
        [-refreshServiceAcl]
        [-refreshUserToGroupsMappings]
        [-refreshSuperUserGroupsConfiguration]
        [-refreshCallQueue]
        [-refresh <host:ipc_port> <key> [arg1..argn]
        [-reconfig <datanode|...> <host:ipc_port> <start|status>]
        [-printTopology]
        [-refreshNamenodes datanode_host:ipc_port]
        [-deleteBlockPool datanode_host:ipc_port blockpoolId [force]]
        [-setBalancerBandwidth <bandwidth in bytes per second>]
        [-fetchImage <local directory>]
        [-allowSnapshot <snapshotDir>]
        [-disallowSnapshot <snapshotDir>]
        [-shutdownDatanode <datanode_host:ipc_port> [upgrade]]
        [-getDatanodeInfo <datanode_host:ipc_port>]
        [-metasave filename]
        [-setStoragePolicy path policyName]
        [-getStoragePolicy path]
        [-triggerBlockReport [-incremental] <datanode_host:ipc_port>]
        [-help [cmd]]
**[-report [-live] [-dead] [-decommissioning]] 报告集群的状况**

* Hadoop dfsadmin –refreshNodes*
• 删除节点时使用
这个文件在Hadoop启动时就要配置好才行!

<property>
    <name>dfs.hosts.exclude</name>
    <value>exclude_file</value>
    </property>
– Exclude_file中加入要去除的节点
– 执行refreshNodes

你可能感兴趣的:(hadoop)