Monitoring adaptor configuration against Hadoop DataNode for single node clusters

Technote (troubleshooting)

Problem(Abstract)

Symptom

When installing a single node cluster using all of the default installation options, the monitoring adaptor for Hadoop DataNode is added without the host/IP information.

Cause

The default Hadoop DataNode installation option for the cluster install type is "Install on nodes other than NameNode" regardless of the number of machines in the cluster. For a single node, that results in zero nodes qualified as available for installing Hadoop DataNode because the NameNode is also installed on the server. The Hadoop DataNode gets installed because the Hadoop installation code uses its own logic to figure this out. However, monitoring does not have the same logic, and therefore is unable to obtain the correct host name/IP for the Hadoop DataNode

Resolving the problem

Using Monitoring REST API, start monitoring using the Enterprise Console.

In a web browser, open http://host:monitoring_agent_port/rest/v1/adaptor, where monitoring_agent_port is what the user defines on the Installer UI. The default is 9090. Examine the XML file returned from the URL for the adaptor ID of the wrong adaptor. The XML section for HadoopDataNode adaptor has dataType attribute set as "DatanodeProcessor".

Using a rest client, issue HTTP DELETE against http://host:monitoring_agent_port/rest/v1/adaptor/adaptor_id, where adaptor_id is what the user figures out in step 2.

Using a rest client, issue HTTP POST against http://host:monitoring_agent_port/rest/v1/adaptor

Set request header to have Content-Type as application/json;charset=UTF-8

Set request body as: {Offset=0, AdaptorClass=org.apache.hadoop.chukwa.datacollection.adaptor.JMXAdaptor, DataType=DatanodeProcessor, AdaptorParams=<host_name> 8007 60 Hadoop:*}, where <host_name> is the actual hostname of the single node cluster