YARN-174. Modify NodeManager to pass the user's configuration even when rebooting. Contributed by Vinod Kumar Vavilapalli.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1401086 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
49beea562a
commit
4da8e2613e
|
@ -165,6 +165,9 @@ Release 0.23.5 - UNRELEASED
|
||||||
YARN-163. Retrieving container log via NM webapp can hang with multibyte
|
YARN-163. Retrieving container log via NM webapp can hang with multibyte
|
||||||
characters in log (jlowe via bobby)
|
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
|
Release 0.23.4 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -253,12 +253,12 @@ public class NodeManager extends CompositeService implements
|
||||||
if (hasToReboot) {
|
if (hasToReboot) {
|
||||||
LOG.info("Rebooting the node manager.");
|
LOG.info("Rebooting the node manager.");
|
||||||
NodeManager nodeManager = createNewNodeManager();
|
NodeManager nodeManager = createNewNodeManager();
|
||||||
nodeManager.initAndStartNodeManager(hasToReboot);
|
nodeManager.initAndStartNodeManager(this.getConfig(), hasToReboot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initAndStartNodeManager(boolean hasToReboot) {
|
private void initAndStartNodeManager(Configuration conf, boolean hasToReboot) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// Remove the old hook if we are rebooting.
|
// Remove the old hook if we are rebooting.
|
||||||
|
@ -270,7 +270,6 @@ public class NodeManager extends CompositeService implements
|
||||||
ShutdownHookManager.get().addShutdownHook(nodeManagerShutdownHook,
|
ShutdownHookManager.get().addShutdownHook(nodeManagerShutdownHook,
|
||||||
SHUTDOWN_HOOK_PRIORITY);
|
SHUTDOWN_HOOK_PRIORITY);
|
||||||
|
|
||||||
YarnConfiguration conf = new YarnConfiguration();
|
|
||||||
this.init(conf);
|
this.init(conf);
|
||||||
this.start();
|
this.start();
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
|
@ -288,6 +287,7 @@ public class NodeManager extends CompositeService implements
|
||||||
Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
|
Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
|
||||||
StringUtils.startupShutdownMessage(NodeManager.class, args, LOG);
|
StringUtils.startupShutdownMessage(NodeManager.class, args, LOG);
|
||||||
NodeManager nodeManager = new NodeManager();
|
NodeManager nodeManager = new NodeManager();
|
||||||
nodeManager.initAndStartNodeManager(false);
|
Configuration conf = new YarnConfiguration();
|
||||||
|
nodeManager.initAndStartNodeManager(conf, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue