[ https://issues.apache.org/jira/browse/HDFS-17559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17863140#comment-17863140 ]
ASF GitHub Bot commented on HDFS-17559: --------------------------------------- haiyang1987 commented on code in PR #6906: URL: https://github.com/apache/hadoop/pull/6906#discussion_r1666402848 ########## hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java: ########## @@ -6674,7 +6674,7 @@ public String getLiveNodes() { .put("infoSecureAddr", node.getInfoSecureAddr()) .put("xferaddr", node.getXferAddr()) .put("location", node.getNetworkLocation()) - .put("uuid", node.getDatanodeUuid()) + .put("uuid", node.getDatanodeUuidForMetric()) Review Comment: Thanks @ayushtkn for your comment. Update PR, please help review it again , thanks! > 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 > Labels: pull-request-available > > 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: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org