Database Reference
In-Depth Information
8. Restart all Hadoop daemons from hduser on all the nodes using the following
command:
$ for x in 'cd /etc/init.d; ls hadoop*'; do sudo
service $x start ; done
The preceding steps should start the namenodes on node1.hcluster as well as
node2.hcluster along with the other Hadoop daemons. When a namenode starts, it is
initially in the standby mode.
Use the hdfs haadmin command to perform the various administrative operations for
HDFS HA. To see all the options available with this command, use the hdfs haadmin
-help command as shown in the following code:
$ hdfs haadmin -help
Usage: DFSHAAdmin [-ns <nameserviceId>]
[-transitionToActive <serviceId>]
[-transitionToStandby <serviceId>]
[-failover [--forcefence] [--forceactive] <serviceId>
<serviceId>]
[-getServiceState <serviceId>]
[-checkHealth <serviceId>]
[-help <command>]
The following is the description of each option available for the hdfs haadmin com-
mand:
transitionToActive : This option is used when you want to change the state of a
standby namenode to active.
transitionToStandby : This option is used when you want to change the state of
an active namenode to standby.
Usage of the preceding two options is not usually done on production systems as
they do not support fencing.
failover : This option is used to perform a failover of the namenodes. Using this
flag, the administrator can set the standby namenode to the active state. For our
configuration, we can use the following command to set the namenode on
node1.hcluster to active:
Search WWH ::




Custom Search