svn merge -c 1305343. Merge MAPREDUCE-4066 into branch-0.23 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1305348 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Harsh J 2012-03-26 13:31:08 +00:00
parent efe3382159
commit 92f06cb446
4 changed files with 12 additions and 5 deletions

View File

@ -80,6 +80,9 @@ Release 0.23.3 - UNRELEASED
MAPREDUCE-3992. Reduce fetcher doesn't verify HTTP status code of response MAPREDUCE-3992. Reduce fetcher doesn't verify HTTP status code of response
(todd) (todd)
MAPREDUCE-4066. Use default value when fetching MR_AM_STAGING_DIR
(xieguiming via harsh)
Release 0.23.2 - UNRELEASED Release 0.23.2 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -193,7 +193,8 @@ public class JobHistoryUtils {
String doneDirPrefix = conf String doneDirPrefix = conf
.get(JHAdminConfig.MR_HISTORY_INTERMEDIATE_DONE_DIR); .get(JHAdminConfig.MR_HISTORY_INTERMEDIATE_DONE_DIR);
if (doneDirPrefix == null) { if (doneDirPrefix == null) {
doneDirPrefix = conf.get(MRJobConfig.MR_AM_STAGING_DIR) doneDirPrefix = conf.get(MRJobConfig.MR_AM_STAGING_DIR,
MRJobConfig.DEFAULT_MR_AM_STAGING_DIR)
+ "/history/done_intermediate"; + "/history/done_intermediate";
} }
return doneDirPrefix; return doneDirPrefix;
@ -208,7 +209,8 @@ public class JobHistoryUtils {
Configuration conf) { Configuration conf) {
String doneDirPrefix = conf.get(JHAdminConfig.MR_HISTORY_DONE_DIR); String doneDirPrefix = conf.get(JHAdminConfig.MR_HISTORY_DONE_DIR);
if (doneDirPrefix == null) { if (doneDirPrefix == null) {
doneDirPrefix = conf.get(MRJobConfig.MR_AM_STAGING_DIR) doneDirPrefix = conf.get(MRJobConfig.MR_AM_STAGING_DIR,
MRJobConfig.DEFAULT_MR_AM_STAGING_DIR)
+ "/history/done"; + "/history/done";
} }
return doneDirPrefix; return doneDirPrefix;

View File

@ -213,9 +213,9 @@ public class MRApps extends Apps {
private static final String STAGING_CONSTANT = ".staging"; private static final String STAGING_CONSTANT = ".staging";
public static Path getStagingAreaDir(Configuration conf, String user) { public static Path getStagingAreaDir(Configuration conf, String user) {
return new Path( return new Path(conf.get(MRJobConfig.MR_AM_STAGING_DIR,
conf.get(MRJobConfig.MR_AM_STAGING_DIR) + MRJobConfig.DEFAULT_MR_AM_STAGING_DIR)
Path.SEPARATOR + user + Path.SEPARATOR + STAGING_CONSTANT); + Path.SEPARATOR + user + Path.SEPARATOR + STAGING_CONSTANT);
} }
public static String getJobFile(Configuration conf, String user, public static String getJobFile(Configuration conf, String user,

View File

@ -332,6 +332,8 @@ public interface MRJobConfig {
/** 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";
public static final String DEFAULT_MR_AM_STAGING_DIR =
"/tmp/hadoop-yarn/staging";
/** The amount of memory the MR app master needs.*/ /** The amount of memory the MR app master needs.*/
public static final String MR_AM_VMEM_MB = public static final String MR_AM_VMEM_MB =