YARN-3457. NPE when NodeManager.serviceInit fails and stopRecoveryStore called. Contributed by Bibin A Chundatt.
(cherry picked from commit ac32fa187cf37e5a51fd579e052105662ab3c411) Conflicts: hadoop-yarn-project/CHANGES.txt
This commit is contained in:
parent
9527cdd12d
commit
bfd28d6f7e
@ -86,6 +86,9 @@ Release 2.7.1 - UNRELEASED
|
||||
YARN-3626. On Windows localized resources are not moved to the front
|
||||
of the classpath when they should be. (Craig Welch via xgong)
|
||||
|
||||
YARN-3457. NPE when NodeManager.serviceInit fails and stopRecoveryStore called.
|
||||
(Bibin A Chundatt via ozawa)
|
||||
|
||||
Release 2.7.0 - 2015-04-20
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -159,16 +159,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…
x
Reference in New Issue
Block a user