YARN-3537. NPE when NodeManager.serviceInit fails and stopRecoveryStore invoked. Contributed by Brahma Reddy Battula

(cherry picked from commit 5e093f0d40)
This commit is contained in:
Jason Lowe 2015-04-24 22:02:53 +00:00
parent 73ba3ebe7c
commit cf4154676b
2 changed files with 17 additions and 12 deletions

View File

@ -245,6 +245,9 @@ Release 2.7.1 - UNRELEASED
YARN-3522. Fixed DistributedShell to instantiate TimeLineClient as the YARN-3522. Fixed DistributedShell to instantiate TimeLineClient as the
correct user. (Zhijie Shen via jianhe) correct user. (Zhijie Shen via jianhe)
YARN-3537. NPE when NodeManager.serviceInit fails and stopRecoveryStore
invoked (Brahma Reddy Battula via jlowe)
Release 2.7.0 - 2015-04-20 Release 2.7.0 - 2015-04-20
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -177,6 +177,7 @@ public class NodeManager extends CompositeService
} }
private void stopRecoveryStore() throws IOException { private void stopRecoveryStore() throws IOException {
if (null != nmStore) {
nmStore.stop(); nmStore.stop();
if (null != context) { if (null != context) {
if (context.getDecommissioned() && nmStore.canRecover()) { if (context.getDecommissioned() && nmStore.canRecover()) {
@ -193,6 +194,7 @@ public class NodeManager extends CompositeService
} }
} }
} }
}
private void recoverTokens(NMTokenSecretManagerInNM nmTokenSecretManager, private void recoverTokens(NMTokenSecretManagerInNM nmTokenSecretManager,
NMContainerTokenSecretManager containerTokenSecretManager) NMContainerTokenSecretManager containerTokenSecretManager)