|
@@ -20,16 +20,13 @@ package org.apache.hadoop.mapreduce.v2;
|
|
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
-import java.net.InetAddress;
|
|
|
|
-import java.net.UnknownHostException;
|
|
|
|
|
|
|
|
import org.apache.commons.logging.Log;
|
|
import org.apache.commons.logging.Log;
|
|
import org.apache.commons.logging.LogFactory;
|
|
import org.apache.commons.logging.LogFactory;
|
|
import org.apache.hadoop.conf.Configuration;
|
|
import org.apache.hadoop.conf.Configuration;
|
|
|
|
+import org.apache.hadoop.fs.CommonConfigurationKeys;
|
|
import org.apache.hadoop.fs.FileContext;
|
|
import org.apache.hadoop.fs.FileContext;
|
|
-import org.apache.hadoop.fs.permission.FsPermission;
|
|
|
|
import org.apache.hadoop.fs.Path;
|
|
import org.apache.hadoop.fs.Path;
|
|
-import org.apache.hadoop.fs.CommonConfigurationKeys;
|
|
|
|
import org.apache.hadoop.mapred.LocalContainerLauncher;
|
|
import org.apache.hadoop.mapred.LocalContainerLauncher;
|
|
import org.apache.hadoop.mapred.ShuffleHandler;
|
|
import org.apache.hadoop.mapred.ShuffleHandler;
|
|
import org.apache.hadoop.mapreduce.MRConfig;
|
|
import org.apache.hadoop.mapreduce.MRConfig;
|
|
@@ -76,6 +73,15 @@ public class MiniMRYarnCluster extends MiniYARNCluster {
|
|
conf.set(MRJobConfig.MR_AM_STAGING_DIR, new File(getTestWorkDir(),
|
|
conf.set(MRJobConfig.MR_AM_STAGING_DIR, new File(getTestWorkDir(),
|
|
"apps_staging_dir/").getAbsolutePath());
|
|
"apps_staging_dir/").getAbsolutePath());
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // By default, VMEM monitoring disabled, PMEM monitoring enabled.
|
|
|
|
+ if (!conf.getBoolean(
|
|
|
|
+ MRConfig.MAPREDUCE_MINICLUSTER_CONTROL_RESOURCE_MONITORING,
|
|
|
|
+ MRConfig.DEFAULT_MAPREDUCE_MINICLUSTER_CONTROL_RESOURCE_MONITORING)) {
|
|
|
|
+ conf.setBoolean(YarnConfiguration.NM_PMEM_CHECK_ENABLED, false);
|
|
|
|
+ conf.setBoolean(YarnConfiguration.NM_VMEM_CHECK_ENABLED, false);
|
|
|
|
+ }
|
|
|
|
+
|
|
conf.set(CommonConfigurationKeys.FS_PERMISSIONS_UMASK_KEY, "000");
|
|
conf.set(CommonConfigurationKeys.FS_PERMISSIONS_UMASK_KEY, "000");
|
|
|
|
|
|
try {
|
|
try {
|