[
https://issues.apache.org/jira/browse/HADOOP-7144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048978#comment-13048978
]
Tanping Wang commented on HADOOP-7144:
--------------------------------------
Suppose we can query each property of a mbean, can we return the JSON string
exactly like what the mbean property function returns? This way it is
consistent between querying through JMXJsonServlet and JMX itself. No
additional parsing will be needed between both situations, it will just be a
plug-and-play when switching back and forth.
For example,
{code}
NameNode#getLiveNodes()
{code}
returns a Json string like,
{noformat}
"LiveNodes" :
"{\"l.yahoo.com\":{\"usedSpace\":49152,\"lastContact\":2,\"adminState\":\"In
Service\"},\"4.yahoo.com\":{\"usedSpace\":49152,\"lastContact\":0,\"adminState\":\"Decommissioned\"}}"
{noformat}
It would be helpful if the exact Json string can be returned when querying via
JMXJsonServlet. If possible, can we eliminate the bean name and modelerType
from the returned string like how JMXJsonServerlet is currently returning, i.e.
{noformat}
{
"beans" : [ {
"name" : "Hadoop:service=NameNode,name=NameNodeInfo",
"modelerType" : "org.apache.hadoop.hdfs.server.namenode.FSNamesystem",
"Threads" : 34,
....
{noformat}
> Expose JMX with something like JMXProxyServlet
> -----------------------------------------------
>
> Key: HADOOP-7144
> URL: https://issues.apache.org/jira/browse/HADOOP-7144
> Project: Hadoop Common
> Issue Type: New Feature
> Reporter: Luke Lu
> Assignee: Robert Joseph Evans
> Labels: jmx
> Fix For: 0.20.205.0, 0.23.0
>
> Attachments: HADOOP-7411-0.20.20X-V1.patch,
> HADOOP-7411-0.20.20X-V2.patch, HADOOP-7411-trunk-V1.patch,
> HADOOP-7411-trunk-V2.patch, HADOOP-7411-trunk-alpha.patch, jmx.json
>
>
> Much of the Hadoop metrics and status info is available via JMX, especially
> since 0.20.100, and 0.22+ (HDFS-1318, HADOOP-6728 etc.) For operations staff
> not familiar JMX setup, especially JMX with SSL and firewall tunnelling, the
> usage can be daunting. Using a JMXProxyServlet (a la Tomcat) to translate JMX
> attributes into JSON output would make a lot of non-Java admins happy.
> We could probably use Tomcat's JMXProxyServlet code directly, if it's already
> output some standard format (JSON or XML etc.) The code is simple enough to
> port over and can probably integrate with the common HttpServer as one of the
> default servelet (maybe /jmx) for the pluggable security.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira