MAPREDUCE-6521. MiniMRYarnCluster should not create /tmp/hadoop-yarn/staging on local filesystem in unit test.

Contributed by Masatake Iwasaki.

Change-Id: Id74b90eb7cfb9d676188fc5aa47249ee8904a3d5
This commit is contained in:
Masatake Iwasaki 2019-07-18 13:15:18 +01:00 committed by Steve Loughran
parent 20cf50c6d0
commit 79f6118dcc
No known key found for this signature in database
GPG Key ID: D22CF846DBB162A0

View File

@ -119,7 +119,9 @@ public static String getResolvedMRHistoryWebAppURLWithoutScheme(
@Override
public void serviceInit(Configuration conf) throws Exception {
conf.set(MRConfig.FRAMEWORK_NAME, MRConfig.YARN_FRAMEWORK_NAME);
if (conf.get(MRJobConfig.MR_AM_STAGING_DIR) == null) {
String stagingDir = conf.get(MRJobConfig.MR_AM_STAGING_DIR);
if (stagingDir == null ||
stagingDir.equals(MRJobConfig.DEFAULT_MR_AM_STAGING_DIR)) {
conf.set(MRJobConfig.MR_AM_STAGING_DIR, new File(getTestWorkDir(),
"apps_staging_dir/").getAbsolutePath());
}