HDFS命令行获取配置

[hadoop@n1 apache-tomcat-8.0.1]$ hdfs getconf
hdfs getconf is utility for getting configuration information from the config file.

hadoop getconf 
        [-namenodes]                    gets list of namenodes in the cluster.
        [-secondaryNameNodes]                   gets list of secondary namenodes in the cluster.
        [-backupNodes]                  gets list of backup nodes in the cluster.
        [-includeFile]                  gets the include file path that defines the datanodes that can join the cluster.
        [-excludeFile]                  gets the exclude file path that defines the datanodes that need to decommissioned.
        [-nnRpcAddresses]                       gets the namenode rpc addresses
        [-confKey [key]]                        gets a specific key from the configuration

示例

获取namenode节点

[hadoop@n1 apache-tomcat-8.0.1]$ hdfs getconf -namenodes
n1 n2

获取指定配置文件

[hadoop@n1 apache-tomcat-8.0.1]$ hdfs getconf -confKey fs.default.name
22/07/19 15:37:58 INFO Configuration.deprecation: fs.default.name is deprecated. Instead, use fs.defaultFS
hdfs://mycluster


HDFS命令行获取配置
https://www.hechunyu.com/archives/1698215586138
作者
chunyu
发布于
2018年11月25日
许可协议