Merge -c 1180767 from trunk to branch-0.23 to fix MAPREDUCE-2876.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1180768 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2011-10-10 03:07:21 +00:00
parent 1f55eeabe4
commit c4c9b7edc7
5 changed files with 20 additions and 29 deletions

View File

@ -1512,6 +1512,9 @@ Release 0.23.0 - Unreleased
MAPREDUCE-2802. Ensure JobHistory filenames have jobId. (Jonathan Eagles MAPREDUCE-2802. Ensure JobHistory filenames have jobId. (Jonathan Eagles
via acmurthy) via acmurthy)
MAPREDUCE-2876. Use a different config for ContainerAllocationExpirer.
(Anupam Seth via acmurthy)
Release 0.22.0 - Unreleased Release 0.22.0 - Unreleased
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -146,22 +146,11 @@ public class YarnConfiguration extends Configuration {
RM_PREFIX + "admin.client.thread-count"; RM_PREFIX + "admin.client.thread-count";
public static final int DEFAULT_RM_ADMIN_CLIENT_THREAD_COUNT = 1; public static final int DEFAULT_RM_ADMIN_CLIENT_THREAD_COUNT = 1;
/** How often should the RM check that the AM is still alive.*/
public static final String RM_AM_LIVENESS_MONITOR_INTERVAL_MS =
RM_PREFIX + "amliveliness-monitor.interval-ms";
public static final int DEFAULT_RM_AM_LIVENESS_MONITOR_INTERVAL_MS = 1000;
/** The maximum number of application master retries.*/ /** The maximum number of application master retries.*/
public static final String RM_AM_MAX_RETRIES = public static final String RM_AM_MAX_RETRIES =
RM_PREFIX + "am.max-retries"; RM_PREFIX + "am.max-retries";
public static final int DEFAULT_RM_AM_MAX_RETRIES = 1; public static final int DEFAULT_RM_AM_MAX_RETRIES = 1;
/** How often to check that containers are still alive. */
public static final String RM_CONTAINER_LIVENESS_MONITOR_INTERVAL_MS =
RM_PREFIX + "container.liveness-monitor.interval-ms";
public static final int DEFAULT_RM_CONTAINER_LIVENESS_MONITOR_INTERVAL_MS =
600000;
/** The keytab for the resource manager.*/ /** The keytab for the resource manager.*/
public static final String RM_KEYTAB = public static final String RM_KEYTAB =
RM_PREFIX + "keytab"; RM_PREFIX + "keytab";
@ -171,10 +160,10 @@ public class YarnConfiguration extends Configuration {
RM_PREFIX + "nm.liveness-monitor.expiry-interval-ms"; RM_PREFIX + "nm.liveness-monitor.expiry-interval-ms";
public static final int DEFAULT_RM_NM_EXPIRY_INTERVAL_MS = 600000; public static final int DEFAULT_RM_NM_EXPIRY_INTERVAL_MS = 600000;
/** How often to check that node managers are still alive.*/ /** How long to wait until a container is considered dead.*/
public static final String RM_NM_LIVENESS_MONITOR_INTERVAL_MS = public static final String RM_CONTAINER_ALLOC_EXPIRY_INTERVAL_MS =
RM_PREFIX + "nm.liveness-monitor.interval-ms"; RM_PREFIX + "rm.container-allocation.expiry-interval-ms";
public static final int DEFAULT_RM_NM_LIVENESS_MONITOR_INTERVAL_MS = 1000; public static final int DEFAULT_RM_CONTAINER_ALLOC_EXPIRY_INTERVAL_MS = 600000;
/** Path to file with nodes to include.*/ /** Path to file with nodes to include.*/
public static final String RM_NODES_INCLUDE_FILE_PATH = public static final String RM_NODES_INCLUDE_FILE_PATH =

View File

@ -39,11 +39,10 @@ public class NMLivelinessMonitor extends AbstractLivelinessMonitor<NodeId> {
public void init(Configuration conf) { public void init(Configuration conf) {
super.init(conf); super.init(conf);
setExpireInterval(conf.getInt(YarnConfiguration.RM_NM_EXPIRY_INTERVAL_MS, int expireIntvl = conf.getInt(YarnConfiguration.RM_NM_EXPIRY_INTERVAL_MS,
YarnConfiguration.DEFAULT_RM_NM_EXPIRY_INTERVAL_MS)); YarnConfiguration.DEFAULT_RM_NM_EXPIRY_INTERVAL_MS);
setMonitorInterval(conf.getInt( setExpireInterval(expireIntvl);
YarnConfiguration.RM_NM_LIVENESS_MONITOR_INTERVAL_MS, setMonitorInterval(expireIntvl/3);
YarnConfiguration.DEFAULT_RM_NM_LIVENESS_MONITOR_INTERVAL_MS));
} }
@Override @Override

View File

@ -37,10 +37,10 @@ public class AMLivelinessMonitor extends AbstractLivelinessMonitor<ApplicationAt
public void init(Configuration conf) { public void init(Configuration conf) {
super.init(conf); super.init(conf);
setExpireInterval(conf.getInt(YarnConfiguration.RM_AM_EXPIRY_INTERVAL_MS, int expireIntvl = conf.getInt(YarnConfiguration.RM_AM_EXPIRY_INTERVAL_MS,
YarnConfiguration.DEFAULT_RM_AM_EXPIRY_INTERVAL_MS)); YarnConfiguration.DEFAULT_RM_AM_EXPIRY_INTERVAL_MS);
setMonitorInterval(conf.getInt(YarnConfiguration.RM_AM_LIVENESS_MONITOR_INTERVAL_MS, setExpireInterval(expireIntvl);
YarnConfiguration.DEFAULT_RM_AM_LIVENESS_MONITOR_INTERVAL_MS)); setMonitorInterval(expireIntvl/3);
} }
@Override @Override

View File

@ -39,11 +39,11 @@ public class ContainerAllocationExpirer extends
public void init(Configuration conf) { public void init(Configuration conf) {
super.init(conf); super.init(conf);
setExpireInterval(conf.getInt( int expireIntvl = conf.getInt(
YarnConfiguration.RM_CONTAINER_LIVENESS_MONITOR_INTERVAL_MS, YarnConfiguration.RM_CONTAINER_ALLOC_EXPIRY_INTERVAL_MS,
YarnConfiguration.DEFAULT_RM_CONTAINER_LIVENESS_MONITOR_INTERVAL_MS)); YarnConfiguration.DEFAULT_RM_CONTAINER_ALLOC_EXPIRY_INTERVAL_MS);
setMonitorInterval(conf.getInt(YarnConfiguration.RM_AM_LIVENESS_MONITOR_INTERVAL_MS, setExpireInterval(expireIntvl);
YarnConfiguration.DEFAULT_RM_AM_LIVENESS_MONITOR_INTERVAL_MS)); setMonitorInterval(expireIntvl/3);
} }
@Override @Override