YARN-174. Modify NodeManager to pass the user's configuration even when rebooting. Contributed by Vinod Kumar Vavilapalli.

svn merge --ignore-ancestry -c 1401086 ../../trunk/


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1401088 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2012-10-22 21:25:56 +00:00
parent 43159cc20d
commit 9c70dfcf25
2 changed files with 7 additions and 4 deletions

View File

@ -148,6 +148,9 @@ Release 0.23.5 - UNRELEASED
YARN-163. Retrieving container log via NM webapp can hang with multibyte
characters in log (jlowe via bobby)
YARN-174. Modify NodeManager to pass the user's configuration even when
rebooting. (vinodkv)
Release 0.23.4 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -253,12 +253,12 @@ public class NodeManager extends CompositeService implements
if (hasToReboot) {
LOG.info("Rebooting the node manager.");
NodeManager nodeManager = createNewNodeManager();
nodeManager.initAndStartNodeManager(hasToReboot);
nodeManager.initAndStartNodeManager(this.getConfig(), hasToReboot);
}
}
}
private void initAndStartNodeManager(boolean hasToReboot) {
private void initAndStartNodeManager(Configuration conf, boolean hasToReboot) {
try {
// Remove the old hook if we are rebooting.
@ -270,7 +270,6 @@ public class NodeManager extends CompositeService implements
ShutdownHookManager.get().addShutdownHook(nodeManagerShutdownHook,
SHUTDOWN_HOOK_PRIORITY);
YarnConfiguration conf = new YarnConfiguration();
this.init(conf);
this.start();
} catch (Throwable t) {
@ -288,6 +287,7 @@ public class NodeManager extends CompositeService implements
Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
StringUtils.startupShutdownMessage(NodeManager.class, args, LOG);
NodeManager nodeManager = new NodeManager();
nodeManager.initAndStartNodeManager(false);
Configuration conf = new YarnConfiguration();
nodeManager.initAndStartNodeManager(conf, false);
}
}