diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 2b0bc80e698..d600e6784aa 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -165,6 +165,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 diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java index 0a68f41c84d..cbb3d2914e7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java @@ -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); } }