Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-1738

change hdfs jmxget to return an empty string instead of null when an attribute value is not available.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • tools
    • None
    • Reviewed

    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)

      Attachments

        1. HDFS-1738.patch
          0.7 kB
          Tanping Wang

        Activity

          People

            tanping Tanping Wang
            tanping Tanping Wang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: