YARN-3457. NPE when NodeManager.serviceInit fails and stopRecoveryStore called. Contributed by Bibin A Chundatt.
This commit is contained in:
parent
ab04ff9efe
commit
dd852f5b8c
@ -153,6 +153,9 @@ Release 2.8.0 - UNRELEASED
|
||||
|
||||
YARN-3110. Few issues in ApplicationHistory web ui. (Naganarasimha G R via xgong)
|
||||
|
||||
YARN-3457. NPE when NodeManager.serviceInit fails and stopRecoveryStore called.
|
||||
(Bibin A Chundatt via ozawa)
|
||||
|
||||
Release 2.7.0 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -177,16 +177,18 @@ private void initAndStartRecoveryStore(Configuration conf)
|
||||
|
||||
private void stopRecoveryStore() throws IOException {
|
||||
nmStore.stop();
|
||||
if (context.getDecommissioned() && nmStore.canRecover()) {
|
||||
LOG.info("Removing state store due to decommission");
|
||||
Configuration conf = getConfig();
|
||||
Path recoveryRoot = new Path(
|
||||
conf.get(YarnConfiguration.NM_RECOVERY_DIR));
|
||||
LOG.info("Removing state store at " + recoveryRoot
|
||||
+ " due to decommission");
|
||||
FileSystem recoveryFs = FileSystem.getLocal(conf);
|
||||
if (!recoveryFs.delete(recoveryRoot, true)) {
|
||||
LOG.warn("Unable to delete " + recoveryRoot);
|
||||
if (null != context) {
|
||||
if (context.getDecommissioned() && nmStore.canRecover()) {
|
||||
LOG.info("Removing state store due to decommission");
|
||||
Configuration conf = getConfig();
|
||||
Path recoveryRoot =
|
||||
new Path(conf.get(YarnConfiguration.NM_RECOVERY_DIR));
|
||||
LOG.info("Removing state store at " + recoveryRoot
|
||||
+ " due to decommission");
|
||||
FileSystem recoveryFs = FileSystem.getLocal(conf);
|
||||
if (!recoveryFs.delete(recoveryRoot, true)) {
|
||||
LOG.warn("Unable to delete " + recoveryRoot);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user