Author: harsh Date: Mon Mar 26 13:21:36 2012 New Revision: 1305343 URL: http://svn.apache.org/viewvc?rev=1305343&view=rev Log: MAPREDUCE-4066. Use default value when fetching MR_AM_STAGING_DIR. Contributed by xieguiming.
Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/jobhistory/JobHistoryUtils.java hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRApps.java hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt?rev=1305343&r1=1305342&r2=1305343&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt (original) +++ hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt Mon Mar 26 13:21:36 2012 @@ -173,6 +173,9 @@ Release 0.23.3 - UNRELEASED MAPREDUCE-3992. Reduce fetcher doesn't verify HTTP status code of response (todd) + MAPREDUCE-4066. Use default value when fetching MR_AM_STAGING_DIR + (xieguiming via harsh) + Release 0.23.2 - UNRELEASED INCOMPATIBLE CHANGES Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/jobhistory/JobHistoryUtils.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/jobhistory/JobHistoryUtils.java?rev=1305343&r1=1305342&r2=1305343&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/jobhistory/JobHistoryUtils.java (original) +++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/jobhistory/JobHistoryUtils.java Mon Mar 26 13:21:36 2012 @@ -193,7 +193,8 @@ public class JobHistoryUtils { String doneDirPrefix = conf .get(JHAdminConfig.MR_HISTORY_INTERMEDIATE_DONE_DIR); 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"; } return doneDirPrefix; @@ -208,7 +209,8 @@ public class JobHistoryUtils { Configuration conf) { String doneDirPrefix = conf.get(JHAdminConfig.MR_HISTORY_DONE_DIR); 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"; } return doneDirPrefix; Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRApps.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRApps.java?rev=1305343&r1=1305342&r2=1305343&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRApps.java (original) +++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRApps.java Mon Mar 26 13:21:36 2012 @@ -213,9 +213,9 @@ public class MRApps extends Apps { private static final String STAGING_CONSTANT = ".staging"; public static Path getStagingAreaDir(Configuration conf, String user) { - return new Path( - conf.get(MRJobConfig.MR_AM_STAGING_DIR) + - Path.SEPARATOR + user + Path.SEPARATOR + STAGING_CONSTANT); + return new Path(conf.get(MRJobConfig.MR_AM_STAGING_DIR, + MRJobConfig.DEFAULT_MR_AM_STAGING_DIR) + + Path.SEPARATOR + user + Path.SEPARATOR + STAGING_CONSTANT); } public static String getJobFile(Configuration conf, String user, Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java?rev=1305343&r1=1305342&r2=1305343&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java (original) +++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/MRJobConfig.java Mon Mar 26 13:21:36 2012 @@ -332,6 +332,8 @@ public interface MRJobConfig { /** The staging directory for map reduce.*/ public static final String MR_AM_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.*/ public static final String MR_AM_VMEM_MB =