How to verify the Hadoop NameNode state through cURL command

How to verify the Hadoop NameNode state through cURL command

book

Article ID: KB0081073

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for Big Data -

Description

In case of any issue observed for getting the connection to Hadoop NameNode, below command can be used to verify the Hadoop metrics in which the Plugin will extract the State in active as a valid connection,

curl <HDFS_URL>/jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus
* the HDFS_URL is the URL setting specified in HDFS Connection resource of the Plugin configuration.

A sample JSON output of the curl command like below,where we can see the State is ‘active’,

$ curl  http://ss01.na.tibco.com:50070/jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus
{
  "beans" : [ {
    "name" : "Hadoop:service=NameNode,name=NameNodeStatus",
    "modelerType" : "org.apache.hadoop.hdfs.server.namenode.NameNode",
    "State" : "active",
    "NNRole" : "NameNode",
    "HostAndPort" : "ss01.na.tibco.com:8020",
    "SecurityEnabled" : true,
    "LastHATransitionTime" : 0,
    "BytesWithFutureGenerationStamps" : 0,
    "SlowPeersReport" : null,
    "SlowDisksReport" : null
  } ]
 

Issue/Introduction

How to verify the Hadoop NameNode state through cURL command

Environment

Product: TIBCO ActiveMatrix BusinessWorks Plug-in for Big Data Version: All supported versions OS: All Supported Operating Systems