YARN-3086. Make NodeManager memory configurable in MiniYARNCluster. Contributed by Robert Metzger.

(cherry picked from commit f56da3ce04)
This commit is contained in:
Tsuyoshi Ozawa 2015-01-28 00:15:34 +09:00
parent aa16173a0d
commit 04ad500fac
3 changed files with 12 additions and 2 deletions

View File

@ -172,6 +172,9 @@ Release 2.7.0 - UNRELEASED
YARN-3092. Created a common ResourceUsage class to track labeled resource YARN-3092. Created a common ResourceUsage class to track labeled resource
usages in Capacity Scheduler. (Wangda Tan via jianhe) usages in Capacity Scheduler. (Wangda Tan via jianhe)
YARN-3086. Make NodeManager memory configurable in MiniYARNCluster.
(Robert Metzger via ozawa)
OPTIMIZATIONS OPTIMIZATIONS
BUG FIXES BUG FIXES

View File

@ -1205,6 +1205,11 @@ public class YarnConfiguration extends Configuration {
public static final boolean public static final boolean
DEFAULT_YARN_MINICLUSTER_CONTROL_RESOURCE_MONITORING = false; DEFAULT_YARN_MINICLUSTER_CONTROL_RESOURCE_MONITORING = false;
/** Allow changing the memory for the NodeManager in the MiniYARNCluster */
public static final String YARN_MINICLUSTER_NM_PMEM_MB =
YARN_MC_PREFIX + YarnConfiguration.NM_PMEM_MB;
public static final int DEFAULT_YARN_MINICLUSTER_NM_PMEM_MB = 4 * 1024;
/** The log directory for the containers */ /** The log directory for the containers */
public static final String YARN_APP_CONTAINER_LOG_DIR = public static final String YARN_APP_CONTAINER_LOG_DIR =
YARN_PREFIX + "app.container.log.dir"; YARN_PREFIX + "app.container.log.dir";

View File

@ -508,8 +508,10 @@ public class MiniYARNCluster extends CompositeService {
String logDirsString = prepareDirs("log", numLogDirs); String logDirsString = prepareDirs("log", numLogDirs);
config.set(YarnConfiguration.NM_LOG_DIRS, logDirsString); config.set(YarnConfiguration.NM_LOG_DIRS, logDirsString);
// By default AM + 2 containers config.setInt(YarnConfiguration.NM_PMEM_MB, config.getInt(
config.setInt(YarnConfiguration.NM_PMEM_MB, 4*1024); YarnConfiguration.YARN_MINICLUSTER_NM_PMEM_MB,
YarnConfiguration.DEFAULT_YARN_MINICLUSTER_NM_PMEM_MB));
config.set(YarnConfiguration.NM_ADDRESS, config.set(YarnConfiguration.NM_ADDRESS,
MiniYARNCluster.getHostname() + ":0"); MiniYARNCluster.getHostname() + ":0");
config.set(YarnConfiguration.NM_LOCALIZER_ADDRESS, config.set(YarnConfiguration.NM_LOCALIZER_ADDRESS,