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

This commit is contained in:
Rohith Sharma K S 2015-09-21 09:59:30 +05:30
parent 3a9c7076e8
commit c9cb6a5960
2 changed files with 5 additions and 1 deletions

View File

@ -863,6 +863,8 @@ Release 2.8.0 - UNRELEASED
YARN-4135. Improve the assertion message in MockRM while failing after waiting for the state. YARN-4135. Improve the assertion message in MockRM while failing after waiting for the state.
(Nijel S F via rohithsharmaks) (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 Release 2.7.2 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

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