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

(cherry picked from commit c9cb6a5960)
This commit is contained in:
Rohith Sharma K S 2015-09-21 09:59:30 +05:30
parent 0095936a6a
commit 52f343598e
2 changed files with 5 additions and 1 deletions

View File

@ -811,6 +811,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 {
if (null != store) {
store.close(); store.close();
}
} catch (Exception e) { } catch (Exception e) {
LOG.error("Error closing store.", e); LOG.error("Error closing store.", e);
} }