diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-1623.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-1623.txt index 2eac773f966..d6eb3c83f7b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-1623.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-1623.txt @@ -200,3 +200,5 @@ HDFS-2939. TestHAStateTransitions fails on Windows. (Uma Maheswara Rao G via atm HDFS-2947. On startup NN throws an NPE in the metrics system. (atm) HDFS-2942. TestActiveStandbyElectorRealZK fails if build dir does not exist. (atm) + +HDFS-2948. NN throws NPE during shutdown if it fails to startup (todd) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java index 2e7292229cf..f1bfa74888f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java @@ -974,7 +974,9 @@ public class NameNode { @Override public void stopActiveServices() throws IOException { - namesystem.stopActiveServices(); + if (namesystem != null) { + namesystem.stopActiveServices(); + } stopTrashEmptier(); }