7. Configure NameNode HA for RHEL Cluster

Follow the tasks listed below to configure NameNode HA:

 7.1. Install NameNode monitoring component

Step 1: Stop all the HDP services that are currently running on your cluster.

  • Use the instructions provided here.

Step 2: Stop the RHEL cluster NameNodeService service.

Step 3: Install the NameNode monitoring component on all the nodes in your RHEL HA cluster.

  • Ensure that you have set up the HDP repository on the RHEL HA cluster nodes as part of the HDP installation. Use the instructions provided here.

  • Install the RPMs.

    • For RHEL/CentOS 5

              wget http://public-repo-1.hortonworks.com/HDP/centos5/1.x/updates/1.2.1/hamonitor_redhat/hmonitor-resource-agent-1.1.0.23-1.el5.x86_64.rpm
              wget http://public-repo-1.hortonworks.com/HDP/centos5/1.x/updates/1.2.1/hamonitor_redhat/hmonitor-1.1.0.23-1.el5.x86_64.rpm
      yum install hmonitor-1.1.0.23-1.el5.x86_64.rpm
      yum install hmonitor-resource-agent-1.1.0.23*.rpm
          

    • For RHEL/CentOS 6

              wget http://public-repo-1.hortonworks.com/HDP/centos5/1.x/updates/1.2.1/hamonitor_redhat/hmonitor-resource-agent-1.1.0.23-1.el6.x86_64.rpm
              wget http://public-repo-1.hortonworks.com/HDP/centos5/1.x/updates/1.2.1/hamonitor_redhat/hmonitor-1.1.0.23-1.el6.x86_64.rpm
      yum install hmonitor-1.1.0.23-1.el6.x86_64.rpm
      yum install hmonitor-resource-agent-1.1.0.23*.rpm
          

 7.2. Configure NameNode service in clustering configuration

Edit the /etc/cluster/cluster.conf file to add the service domain specifications. You can use the following sample configuration. (Note that this sample configuration is for a small cluster and the timeouts for booting, probing, and stopping have been reduced to a minimum.)

<service domain="HANameNode" name="NameNodeService" recovery="restart">
  <ip address="10.10.10.89" sleeptime="10"/>
  <netfs export="/hdp/hadoop-nfs" force_unmount="1" fstype="nfs"
         host="10.10.10.88" mountpoint="/hdp/hadoop/hdfs/nn"
         name="HDFS data" options="rw,soft,nolock"/>
  <hadoop
         __independent_subtree="1" __max_restarts="10"
         __restart_expire_time="600" name="NameNode Process"
         daemon="namenode" boottime="10000" probetime="10000"
         stoptime="10000"
         url="http://10.0.0.30:50070/dfshealth.jsp"
         pid="/var/run/hadoop/hdfs/hadoop-hdfs-namenode.pid"
         path="/"/>
</service>
    

The following table explains the parameters used in the above configuration:

Table 3.1. Parameters for configuring NameNode service in clustering configuration
Name Description Mandatory/Optional

daemon

Name of the hadoop service which will be started by bin/hadoop-daemon.

Mandatory

url

URL to check for the service web page. This should be on the floating IP address.

Mandatory

pid

Process ID of the NameNode process. (Default: “”)

Optional

path

Path under DFS to probe. (Default: /)

Optional

boottime

Time (in milliseconds) to allow for the service to boot up. This must include any activities that take place before the service web pages and IPC services are reachable. For the NameNode, it must include the time for the edit log to be replayed. (Default: 180000)

Optional

probetime

Time (in milliseconds) to allow for a process to respond to liveness probes. This duration must be longer than the maximum expected GC pause. (Default: 120000)

Optional

stoptime

Time (in milliseconds) to allow for a clean shutdown before forcibly killing a process. (Default: 60000)

Optional


loading table of contents...