命令选项 | 描述 |
-report [-live] [-dead] [-decommissioning] | Reports basic filesystem information and statistics. Optional flags may be used to filter the list of displayed DataNodes. 报告基本的文件系统信息和统计。可选标志可用于过滤显示的数据节点列表。 |
-safemode enter|leave|get|wait | Safe mode maintenance command. Safe mode is a Namenode state in which it 1. does not accept changes to the name space (read-only) 2. does not replicate or delete blocks. Safe mode is entered automatically at Namenode startup, and leaves safe mode automatically when the configured minimum percentage of blocks satisfies the minimum replication condition. Safe mode can also be entered manually, but then it can only be turned off manually as well. 安全模式维护命令。安全模式是Namenode状态,其中 1.不接受对名称空间的更改(只读) 2.不复制或删除块。 安全模式是在Namenode启动时自动输入的,当配置的块的最小百分比满足最小复制条件时,将自动离开安全模式。安全模式也可以手动输入,但只能手动关闭。 |
-saveNamespace | Save current namespace into storage directories and reset edits log. Requires safe mode. 将当前名称空间保存到存储目录并重置编辑日志。需要安全模式。 |
-rollEdits | Rolls the edit log on the active NameNode. 在活动的NameNode上滚动编辑日志。 |
-restoreFailedStorage true|false|check | This option will turn on/off automatic attempt to restore failed storage replicas. If a failed storage becomes available again the system will attempt to restore edits and/or fsimage during checkpoint. 'check' option will return current setting. 该选项将打开/关闭自动尝试恢复失败的存储副本。如果失败的存储器再次可用,则系统将在检查点期间尝试恢复编辑和/或fsimage。'check'选项将返回当前设置。 |
-refreshNodes | 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. 重新读取主机并排除文件以更新允许连接到Namenode的那组Datanode以及那些应该停用或重新试用的Datanode。 |
-setQuota <quota> <dirname>...<dirname> | See HDFS Quotas Guide for the detail. 有关详细信息,请参阅HDFS配额指南。 |
-clrQuota <dirname>...<dirname> | See HDFS Quotas Guide for the detail. 有关详细信息,请参阅HDFS配额指南。 |
-setSpaceQuota <quota> <dirname>...<dirname> | See HDFS Quotas Guide for the detail. 有关详细信息,请参阅HDFS配额指南。 |
-clrSpaceQuota <dirname>...<dirname> | See HDFS Quotas Guide for the detail. 有关详细信息,请参阅HDFS配额指南。 |
-setStoragePolicy <path> <policyName> | Set a storage policy to a file or a directory. 将存储策略设置为文件或目录。 |
-getStoragePolicy <path> | Get the storage policy of a file or a directory. 获取文件或目录的存储策略。 |
-finalizeUpgrade | Finalize upgrade of HDFS. Datanodes delete their previous version working directories, followed by Namenode doing the same. This completes the upgrade process. 完成HDFS的升级。Datanodes删除他们以前的版本工作目录,然后Namenode做相同的工作。这完成了升级过程。 |
-rollingUpgrade [<query>|<prepare>|<finalize>] | See Rolling Upgrade document for the detail. 有关详细信息,请参阅滚动升级文档。 |
-metasave filename | Save Namenode's primary data structures to filename in the directory specified by hadoop.log.dir property. filename is overwritten if it exists. filename will contain one line for each of the following 1. Datanodes heart beating with Namenode 2. Blocks waiting to be replicated 3. Blocks currently being replicated 4. Blocks waiting to be deleted 将Namenode的主要数据结构保存到由hadoop.log.dir属性指定的目录中的文件名。如果它存在,则文件名被覆盖。文件名将包含以下每行的一行 1. Datanodes的心跳与Namenode 2.等待被复制的块 3.当前正在复制的块 4.等待被删除的块 |
-refreshServiceAcl | Reload the service-level authorization policy file. 重新加载服务级别授权策略文件。 |
-refreshUserToGroupsMappings | Refresh user-to-groups mappings. 刷新用户到组映射。 |
-refreshSuperUserGroupsConfiguration | Refresh superuser proxy groups mappings 刷新超级用户代理组映射 |
-refreshCallQueue | Reload the call queue from config. 从配置重新加载呼叫队列。 |
-refresh <host:ipc_port> <key> [arg1..argn] | Triggers a runtime-refresh of the resource specified by <key> on <host:ipc_port>. All other args after are sent to the host. 触发<host:ipc_port>上由<key>指定的资源的运行时刷新。所有其他参数都发送给主机。 |
-printTopology | Print a tree of the racks and their nodes as reported by the Namenode 打印由Namenode报告的机架及其节点的树 |
-refreshNamenodes datanodehost:port | For the given datanode, reloads the configuration files, stops serving the removed block-pools and starts serving new block-pools. 对于给定的datanode,重新加载配置文件,停止提供已移除的块池并开始提供新的块池。 |
-deleteBlockPool datanode-host:port blockpoolId [force] | If force is passed, block pool directory for the given blockpool id on the given datanode is deleted along with its contents, otherwise the directory is deleted only if it is empty. The command will fail if datanode is still serving the block pool. Refer to refreshNamenodes to shutdown a block pool service on a datanode. 如果强制传递,给定数据节点上的给定块池ID的块池目录与其内容一起被删除,否则该目录仅在其为空时才被删除。如果datanode仍在服务块池,该命令将失败。请参阅refreshNamenodes关闭数据节点上的块池服务。 |
-setBalancerBandwidth <bandwidth in bytes per second> | Changes the network bandwidth used by each datanode during HDFS block balancing. <bandwidth> is the maximum number of bytes per second that will be used by each datanode. This value overrides the dfs.balance.bandwidthPerSec parameter. NOTE: The new value is not persistent on the DataNode. 在HDFS块平衡期间更改每个数据节点使用的网络带宽。<bandwidth>是每个datanode将使用的每秒最大字节数。该值将覆盖dfs.balance.bandwidthPerSec参数。 注意:新值在DataNode上不是永久的。 |
-allowSnapshot <snapshotDir> | Allowing snapshots of a directory to be created. If the operation completes successfully, the directory becomes snapshottable. 允许创建目录的快照。如果操作成功完成,则该目录变为快照可见。 |
-disallowSnapshot <snapshotDir> | Disallowing snapshots of a directory to be created. All snapshots of the directory must be deleted before disallowing snapshots. 禁止要创建的目录的快照。在禁用快照之前,必须删除目录的所有快照。 |
-fetchImage <local directory> | Downloads the most recent fsimage from the NameNode and saves it in the specified local directory. 从NameNode下载最新的fsimage并将其保存在指定的本地目录中。 |
-shutdownDatanode <datanode_host:ipc_port> [upgrade] | Submit a shutdown request for the given datanode. See Rolling Upgrade document for the detail. 为给定的datanode提交关闭请求。有关详细信息,请参阅滚动升级文档。 |
-getDatanodeInfo <datanode_host:ipc_port> | Get the information about the given datanode. See Rolling Upgrade document for the detail. 获取有关给定datanode的信息。有关详细信息,请参阅滚动升级文档。 |
-triggerBlockReport [-incremental] <datanode_host:ipc_port> | Trigger a block report for the given datanode. If 'incremental' is specified, it will be otherwise, it will be a full block report. 触发给定数据节点的块报告。如果指定了'增量',那么将会是一个完整的块报告。 |
-help [cmd] | Displays help for the given command or all commands if none is specified. 如果没有指定,则显示给定命令的帮助或所有命令。 |
暂时没有评论,来抢沙发吧~