[
https://issues.apache.org/jira/browse/HDFS-1738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tanping Wang updated HDFS-1738:
-------------------------------
Description:
Currently the tool, hdfs jmx returns null in case of an attribute value is not
available. A null pointer exception is thrown and the value of the rest
attributes are not printed. It makes more sense to return an empty string and
continue to print out the values for the rest attributes.
Example of current behavior
$ hdfs jmxget -server hostname.com -port 8004 -service
NameNode,name=NameNodeActivity
>>>>>>>>jmx name: name=NameNodeActivity,service=NameNode
tag.ProcessName=NameNode
java.lang.NullPointerException
at org.apache.hadoop.hdfs.tools.JMXGet.printAllValues(JMXGet.java:106)
at org.apache.hadoop.hdfs.tools.JMXGet.main(JMXGet.java:329)
was:
Currently the tool, hdfs jmx returns null in case of an attribute value is not
available. A null pointer exception is thrown and the value of the rest
attributes are not printed. It makes more sense to return an empty string and
continue to print out the values for the rest attributes.
Example of current behavior
$ hdfs jmxget -server gsbl90629.blue.ygrid.yahoo.com -port 8004 -service
NameNode,name=NameNodeActivity
>>>>>>>>jmx name: name=NameNodeActivity,service=NameNode
tag.ProcessName=NameNode
java.lang.NullPointerException
at org.apache.hadoop.hdfs.tools.JMXGet.printAllValues(JMXGet.java:106)
at org.apache.hadoop.hdfs.tools.JMXGet.main(JMXGet.java:329)
> change hdfs jmxget to return an empty string instead of null when an
> attribute value is not available.
> ------------------------------------------------------------------------------------------------------
>
> Key: HDFS-1738
> URL: https://issues.apache.org/jira/browse/HDFS-1738
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: tools
> Reporter: Tanping Wang
> Assignee: Tanping Wang
> Priority: Minor
> Attachments: HDFS-1738.patch
>
>
> Currently the tool, hdfs jmx returns null in case of an attribute value is
> not available. A null pointer exception is thrown and the value of the rest
> attributes are not printed. It makes more sense to return an empty string
> and continue to print out the values for the rest attributes.
> Example of current behavior
> $ hdfs jmxget -server hostname.com -port 8004 -service
> NameNode,name=NameNodeActivity
> >>>>>>>>jmx name: name=NameNodeActivity,service=NameNode
> tag.ProcessName=NameNode
> java.lang.NullPointerException
> at org.apache.hadoop.hdfs.tools.JMXGet.printAllValues(JMXGet.java:106)
> at org.apache.hadoop.hdfs.tools.JMXGet.main(JMXGet.java:329)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira