[ 
https://issues.apache.org/jira/browse/HDFS-17559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Haiyang Hu updated HDFS-17559:
------------------------------
    Description: 
If there is datanode info in includes, but the datanode service is not 
currently started, the uuid of the datanode will be null. 
when get the DeadNodes DeadNodes metric, the following exception will occur:
{code:java}
2024-06-26 17:06:49,698 ERROR jmx.JMXJsonServlet 
(JMXJsonServlet.java:writeAttribute(345)) [qtp1107412069-7704] - getting 
attribute DeadNodes of Hadoop:service=NameNode,name=NameNodeInfo threw an 
exception javax.management.RuntimeMBeanException: 
java.lang.NullPointerException: null value in entry: uuid=null
        at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839)
        at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852)
        at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:651)
        at 
com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678)
        at 
org.apache.hadoop.jmx.JMXJsonServlet.writeAttribute(JMXJsonServlet.java:338)
{code}


  was:
If there is datanode info in includes, but the datanode service is not 
currently started, the uuid of the datanode will be null. When getting the 
DeadNodes DeadNodes metric, the following exception will occur:
{code:java}
2024-06-26 17:06:49,698 ERROR jmx.JMXJsonServlet 
(JMXJsonServlet.java:writeAttribute(345)) [qtp1107412069-7704] - getting 
attribute DeadNodes of Hadoop:service=NameNode,name=NameNodeInfo threw an 
exception javax.management.RuntimeMBeanException: 
java.lang.NullPointerException: null value in entry: uuid=null
        at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839)
        at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852)
        at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:651)
        at 
com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678)
        at 
org.apache.hadoop.jmx.JMXJsonServlet.writeAttribute(JMXJsonServlet.java:338)
{code}



> Fix the uuid as null in NameNodeMXBean
> --------------------------------------
>
>                 Key: HDFS-17559
>                 URL: https://issues.apache.org/jira/browse/HDFS-17559
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Haiyang Hu
>            Assignee: Haiyang Hu
>            Priority: Major
>
> If there is datanode info in includes, but the datanode service is not 
> currently started, the uuid of the datanode will be null. 
> when get the DeadNodes DeadNodes metric, the following exception will occur:
> {code:java}
> 2024-06-26 17:06:49,698 ERROR jmx.JMXJsonServlet 
> (JMXJsonServlet.java:writeAttribute(345)) [qtp1107412069-7704] - getting 
> attribute DeadNodes of Hadoop:service=NameNode,name=NameNodeInfo threw an 
> exception javax.management.RuntimeMBeanException: 
> java.lang.NullPointerException: null value in entry: uuid=null
>         at 
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839)
>         at 
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852)
>         at 
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:651)
>         at 
> com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678)
>         at 
> org.apache.hadoop.jmx.JMXJsonServlet.writeAttribute(JMXJsonServlet.java:338)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to