[
https://issues.apache.org/jira/browse/HADOOP-9562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13663064#comment-13663064
]
Philip Zeyliger commented on HADOOP-9562:
-----------------------------------------
Y'all are aware that
{code}
GET http://namenode:50070/jmx?qry=Hadoop:service=NameNode,name=NameNodeInfo
{code}
returns something along the lines of
{code}
{
"beans" : [ {
"name" : "Hadoop:service=NameNode,name=NameNodeInfo",
"modelerType" : "org.apache.hadoop.hdfs.server.namenode.FSNamesystem",
"Threads" : 60,
"Total" : 39793714372608,
"ClusterId" : "cluster19",
"BlockPoolId" : "BP-1187031495-172.29.122.20-1355867299076",
"Used" : 19269710336134,
"PercentUsed" : 48.424004,
"PercentRemaining" : 31.148054,
"Version" : "2.0.0-cdh4.3.0-SNAPSHOT,
rcb6dc0d3d99891eb095dc6577a440d7dde067789",
"Free" : 12394968694784,
"Safemode" : "",
"UpgradeFinalized" : true,
"NonDfsUsedSpace" : 8129035341690,
"BlockPoolUsedSpace" : 19269710336134,
"PercentBlockPoolUsed" : 48.424004,
"TotalBlocks" : 64237,
"TotalFiles" : 27708,
"NumberOfMissingBlocks" : 0,
"LiveNodes" :
"{\"p0431.mtv.cloudera.com\":{\"numBlocks\":32249,\"usedSpace\":3220494794752,\"lastContact\":1,\"capacity\":5688127021056,\"nonDfsUsedSpace\":560239116288,\"adminState\":\"In
Service\"},\"p0429.mtv.cloudera.com\":{\"numBlocks\":25709,\"usedSpace\":2468956155904,\"lastContact\":2,\"capacity\":5688127021056,\"nonDfsUsedSpace\":1509498798080,\"adminState\":\"In
Service\"},\"p0427.mtv.cloudera.com\":{\"numBlocks\":16919,\"usedSpace\":2056487919683,\"lastContact\":0,\"capacity\":5676539633664,\"nonDfsUsedSpace\":1999484977085,\"adminState\":\"In
Service\"},\"p0430.mtv.cloudera.com\":{\"numBlocks\":31258,\"usedSpace\":3117177036800,\"lastContact\":2,\"capacity\":5688127021056,\"nonDfsUsedSpace\":987432075264,\"adminState\":\"In
Service\"},\"p0432.mtv.cloudera.com\":{\"numBlocks\":20877,\"usedSpace\":1899904856064,\"lastContact\":0,\"capacity\":5688127021056,\"nonDfsUsedSpace\":1620254515200,\"adminState\":\"In
Service\"},\"p0433.mtv.cloudera.com\":{\"numBlocks\":31995,\"usedSpace\":3204067667968,\"lastContact\":1,\"capacity\":5688127021056,\"nonDfsUsedSpace\":172768587776,\"adminState\":\"In
Service\"},\"p0428.mtv.cloudera.com\":{\"numBlocks\":33680,\"usedSpace\":3302621904963,\"lastContact\":0,\"capacity\":5676539633664,\"nonDfsUsedSpace\":1279357271997,\"adminState\":\"In
Service\"}}",
"DeadNodes" : "{}",
"DecomNodes" : "{}",
"NameDirStatuses" :
"{\"failed\":{},\"active\":{\"/data/1/dfs2/nn\":\"IMAGE_AND_EDITS\",\"/data/2/dfs2/nn\":\"IMAGE_AND_EDITS\"}}"
} ]
}
{code}
Is that sufficient? I'd rather whatever missing information be added to
existing JMX beans, which already accessible via HTTP, than new equivalent APIs
be added.
There's also a java API in DFSClient
{code}
$hdfs dfsadmin -report
Configured Capacity: 39793714372608 (36.19 TB)
Present Capacity: 31664679067648 (28.80 TB)
DFS Remaining: 12394968727552 (11.27 TB)
DFS Used: 19269710340096 (17.53 TB)
DFS Used%: 60.86%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0
-------------------------------------------------
report: Access denied for user philip. Superuser privilege is required
{code}
> Create REST interface for HDFS health data
> ------------------------------------------
>
> Key: HADOOP-9562
> URL: https://issues.apache.org/jira/browse/HADOOP-9562
> Project: Hadoop Common
> Issue Type: Improvement
> Components: fs
> Affects Versions: 2.0.4-alpha
> Reporter: Trevor Lorimer
> Priority: Minor
> Attachments: 0001-HAD-162-Final-revision-refactor.patch
>
>
> The HDFS health screen (dfshealth.jsp) displays basic Version, Security and
> Health information concerning the NameNode, currently this information is
> accessible from classes in the org.apache.hadoop,hdfs.server.namenode package
> and cannot be accessed outside the NameNode. This becomes prevalent if the
> data is required to be displayed using a new user interface.
> The proposal is to create a REST interface to expose all the information
> displayed on dfshealth.jsp using GET methods. Wrapper classes will be created
> to serve the data to the REST root resource within the hadoop-hdfs project.
> This will enable the HDFS health screen information to be accessed remotely.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira