Complete the following instructions to configure automatic fail over:
Install and configure vSphere Monitoring Agent
The NameNode’s monitoring agent monitors the NameNode daemon and notifies the vSphere if the NameNode daemon fails or becomes unstable. As soon as the vSphere receives the notification, it triggers HA solution to restart NameNode VM on either the same or a different ESXi host.
Follow the steps listed below to install and configure the monitoring agent:
On the NameNode VM, download the Hortonworks Data Platform High Availability Kit for VMware from here and complete the following instructions:
Extract the archive file into a directory and navigate into the directory.
Install the NameNode monitoring functionality:
yum install hmonitor
yum install hmonitor-vsphere-monitoring-*
yum install hmonitor-vsphere-namenode-daemon
Configure the monitoring agent to point to the NameNode configurations.
Edit the
/usr/lib/hadoop/monitor/vm-namenode.xml
file and provide the FQDN for your NameNode VM here:<property> <name>service.monitor.portprobe.host</name> <value>$NameNode_FQDN</value> <description> Port to probe via a telnet operation.</description> </property>
Provide the HDFS port number.
<property> <name>service.monitor.portprobe.port</name> <value>$HDFS_filesystem_port</value> <description> Port to probe via a telnet operation.</description> </property>
Provide the FQDN and port information for the HDFS filesystem.
<property> <name>service.monitor.webprobe.url</name> <value>$http://NameNode_FQDN:NameNode_web_ui_port/</value> <description> URL to get.</description> </property>
Configure the NameNode to start automatically on OS boot
The monitoring agent requires that the NameNode process should start automatically once the virtual machine is bootstrapped.
To configure this, use the following command:
yum install hadoop-namenode