YARN-3086. Make NodeManager memory configurable in MiniYARNCluster. Contributed by Robert Metzger.
This commit is contained in:
parent
0da53a37ec
commit
f56da3ce04
|
@ -206,6 +206,9 @@ Release 2.7.0 - UNRELEASED
|
|||
YARN-3092. Created a common ResourceUsage class to track labeled resource
|
||||
usages in Capacity Scheduler. (Wangda Tan via jianhe)
|
||||
|
||||
YARN-3086. Make NodeManager memory configurable in MiniYARNCluster.
|
||||
(Robert Metzger via ozawa)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
BUG FIXES
|
||||
|
|
|
@ -1205,6 +1205,11 @@ public class YarnConfiguration extends Configuration {
|
|||
public static final boolean
|
||||
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 */
|
||||
public static final String YARN_APP_CONTAINER_LOG_DIR =
|
||||
YARN_PREFIX + "app.container.log.dir";
|
||||
|
|
|
@ -508,8 +508,10 @@ public class MiniYARNCluster extends CompositeService {
|
|||
String logDirsString = prepareDirs("log", numLogDirs);
|
||||
config.set(YarnConfiguration.NM_LOG_DIRS, logDirsString);
|
||||
|
||||
// By default AM + 2 containers
|
||||
config.setInt(YarnConfiguration.NM_PMEM_MB, 4*1024);
|
||||
config.setInt(YarnConfiguration.NM_PMEM_MB, config.getInt(
|
||||
YarnConfiguration.YARN_MINICLUSTER_NM_PMEM_MB,
|
||||
YarnConfiguration.DEFAULT_YARN_MINICLUSTER_NM_PMEM_MB));
|
||||
|
||||
config.set(YarnConfiguration.NM_ADDRESS,
|
||||
MiniYARNCluster.getHostname() + ":0");
|
||||
config.set(YarnConfiguration.NM_LOCALIZER_ADDRESS,
|
||||
|
|
Loading…
Reference in New Issue