瀏覽代碼

YARN-4167. NPE on RMActiveServices#serviceStop when store is null. (Bibin A Chundatt via rohithsharmaks)

Rohith Sharma K S 9 年之前
父節點
當前提交
c9cb6a5960

+ 2 - 0
hadoop-yarn-project/CHANGES.txt

@@ -863,6 +863,8 @@ Release 2.8.0 - UNRELEASED
     YARN-4135. Improve the assertion message in MockRM while failing after waiting for the state.
     (Nijel S F via rohithsharmaks)
 
+    YARN-4167. NPE on RMActiveServices#serviceStop when store is null. (Bibin A Chundatt via rohithsharmaks)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

+ 3 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java

@@ -605,7 +605,9 @@ public class ResourceManager extends CompositeService implements Recoverable {
       if (rmContext != null) {
         RMStateStore store = rmContext.getStateStore();
         try {
-          store.close();
+          if (null != store) {
+            store.close();
+          }
         } catch (Exception e) {
           LOG.error("Error closing store.", e);
         }