Merge -c 1241285 from trunk to branch-0.23 to fix PREDUCE-3811. Made jobclient-to-AM retries configurable. Contributed by Siddharth Seth.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1241286 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2012-02-07 00:21:19 +00:00
parent c6356556be
commit c1596a6c3b
4 changed files with 20 additions and 1 deletions

View File

@ -194,6 +194,9 @@ Release 0.23.1 - Unreleased
MAPREDUCE-3756. Made single shuffle limit configurable. (Hitesh Shah via MAPREDUCE-3756. Made single shuffle limit configurable. (Hitesh Shah via
acmurthy) acmurthy)
MAPREDUCE-3811. Made jobclient-to-AM retries configurable. (sseth via
acmurthy)
BUG FIXES BUG FIXES
MAPREDUCE-3804. yarn webapp interface vulnerable to cross scripting attacks MAPREDUCE-3804. yarn webapp interface vulnerable to cross scripting attacks
(Dave Thompson via bobby) (Dave Thompson via bobby)

View File

@ -320,6 +320,13 @@ public interface MRJobConfig {
public static final String MR_AM_PREFIX = MR_PREFIX + "am."; public static final String MR_AM_PREFIX = MR_PREFIX + "am.";
/** The number of client retires to the AM - before reconnecting to the RM
* to fetch Application State.
*/
public static final String MR_CLIENT_TO_AM_IPC_MAX_RETRIES =
MR_PREFIX + "client-am.ipc.max-retries";
public static final int DEFAULT_MR_CLIENT_TO_AM_IPC_MAX_RETRIES = 3;
/** The staging directory for map reduce.*/ /** The staging directory for map reduce.*/
public static final String MR_AM_STAGING_DIR = public static final String MR_AM_STAGING_DIR =
MR_AM_PREFIX+"staging-dir"; MR_AM_PREFIX+"staging-dir";

View File

@ -1255,4 +1255,11 @@
heartbeats to the ResourceManager</description> heartbeats to the ResourceManager</description>
</property> </property>
<property>
<name>yarn.app.mapreduce.client-am.ipc.max-retries</name>
<value>1</value>
<description>The number of client retries to the AM - before reconnecting
to the RM to fetch Application Status.</description>
</property>
</configuration> </configuration>

View File

@ -101,7 +101,9 @@ public class ClientServiceDelegate {
this.conf = new Configuration(conf); // Cloning for modifying. this.conf = new Configuration(conf); // Cloning for modifying.
// For faster redirects from AM to HS. // For faster redirects from AM to HS.
this.conf.setInt( this.conf.setInt(
CommonConfigurationKeysPublic.IPC_CLIENT_CONNECT_MAX_RETRIES_KEY, 3); CommonConfigurationKeysPublic.IPC_CLIENT_CONNECT_MAX_RETRIES_KEY,
this.conf.getInt(MRJobConfig.MR_CLIENT_TO_AM_IPC_MAX_RETRIES,
MRJobConfig.DEFAULT_MR_CLIENT_TO_AM_IPC_MAX_RETRIES));
this.rm = rm; this.rm = rm;
this.jobId = jobId; this.jobId = jobId;
this.historyServerProxy = historyServerProxy; this.historyServerProxy = historyServerProxy;