Skip to content

Commit 79f6118

Browse files
iwasakimssteveloughran
authored andcommitted
MAPREDUCE-6521. MiniMRYarnCluster should not create /tmp/hadoop-yarn/staging on local filesystem in unit test.
Contributed by Masatake Iwasaki. Change-Id: Id74b90eb7cfb9d676188fc5aa47249ee8904a3d5
1 parent 20cf50c commit 79f6118

File tree

1 file changed

+3
-1
lines changed
  • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2

1 file changed

+3
-1
lines changed

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/MiniMRYarnCluster.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ public static String getResolvedMRHistoryWebAppURLWithoutScheme(
119119
@Override
120120
public void serviceInit(Configuration conf) throws Exception {
121121
conf.set(MRConfig.FRAMEWORK_NAME, MRConfig.YARN_FRAMEWORK_NAME);
122-
if (conf.get(MRJobConfig.MR_AM_STAGING_DIR) == null) {
122+
String stagingDir = conf.get(MRJobConfig.MR_AM_STAGING_DIR);
123+
if (stagingDir == null ||
124+
stagingDir.equals(MRJobConfig.DEFAULT_MR_AM_STAGING_DIR)) {
123125
conf.set(MRJobConfig.MR_AM_STAGING_DIR, new File(getTestWorkDir(),
124126
"apps_staging_dir/").getAbsolutePath());
125127
}

0 commit comments

Comments
 (0)