[ https://issues.apache.org/jira/browse/HDFS-1042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846648#action_12846648 ]
Todd Lipcon commented on HDFS-1042: ----------------------------------- Sample stack trace from a CDH 0.20.2: {noformat} java.lang.NullPointerException at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getFilesTotal(FSNamesystem.java:4621) at org.apache.hadoop.hdfs.server.namenode.metrics.FSNamesystemMetrics.doUpdates(FSNamesystemMetrics.java:100) at org.apache.hadoop.metrics.spi.AbstractMetricsContext.timerEvent(AbstractMetricsContext.java:293) at org.apache.hadoop.metrics.spi.AbstractMetricsContext.access$000(AbstractMetricsContext.java:53) at org.apache.hadoop.metrics.spi.AbstractMetricsContext$1.run(AbstractMetricsContext.java:258) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) {noformat} > Namesystem metrics are collected before namesystem is fully initialized > ----------------------------------------------------------------------- > > Key: HDFS-1042 > URL: https://issues.apache.org/jira/browse/HDFS-1042 > Project: Hadoop HDFS > Issue Type: Bug > Components: name-node > Affects Versions: 0.20.2, 0.21.0, 0.22.0 > Reporter: Todd Lipcon > > FSNamesystem leaks its reference out to the metrics system before it has > initialized FSDirectory. Therefore in rare occasions you can get NPEs when > metrics try to collect data from FSN before it's initialized. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.