Fetching parameters which are in-effect
In this recipe, we look at how we can fetch the configured parameters in the Hadoop cluster, without going through the files.
The parameters are either default values, defined by files such as hdfs-default.xml
, core-default.xml
, yarn-default.xml
, and so on, or defined explicitly in the configuration files such as hdfs-site.xml
, core-site.xml
, mapred-site.xml
, and a few others. The default files are part of the packaged jars with the distribution, and any changes we make overrides them.
Getting ready
To step through the recipe, the user needs at least one node in the cluster and needs to make sure that the Hadoop environment variables are in place. It is not necessary to start any of the daemons in the cluster.
How to do it...
Connect to the
master1.cyrus.com
master node in the cluster and switch to userhadoop
.To find the value of any parameter, use the following command:
$ hdfs getconf –confkey dfs.blocksize $ hdfs getconf –confkey dfs.replication $ hdfs...