JobConf extends Configuration { public JobConf() { checkAndWarnDeprecation(); } JobConf();  JobConf(Class exampleClass);  JobConf(Configuration conf);  JobConf(Configuration conf, Class exampleClass);  JobConf(String config);  JobConf(Path config);  JobConf(boolean loadDefaults); Credentials getCredentials(); @Private void setCredentials(Credentials credentials); String getJar(); void setJar(String jar); Pattern getJarUnpackPattern(); void setJarByClass(Class cls); String[] getLocalDirs(); @Deprecated void deleteLocalFiles(); void deleteLocalFiles(String subdir); Path getLocalPath(String pathString); String getUser(); void setUser(String user); void setKeepFailedTaskFiles(boolean keep); boolean getKeepFailedTaskFiles(); void setKeepTaskFilesPattern(String pattern); String getKeepTaskFilesPattern(); void setWorkingDirectory(Path dir); Path getWorkingDirectory(); void setNumTasksToExecutePerJvm(int numTasks); int getNumTasksToExecutePerJvm(); InputFormat getInputFormat(); void setInputFormat(Class<? extends InputFormat> theClass); OutputFormat getOutputFormat(); OutputCommitter getOutputCommitter(); void setOutputCommitter(Class<? extends OutputCommitter> theClass); void setOutputFormat(Class<? extends OutputFormat> theClass); void setCompressMapOutput(boolean compress); boolean getCompressMapOutput(); void setMapOutputCompressorClass(Class<? extends CompressionCodec> codecClass); Class<? extends CompressionCodec> getMapOutputCompressorClass(Class<? extends CompressionCodec> defaultValue); Class<?> getMapOutputKeyClass(); void setMapOutputKeyClass(Class<?> theClass); Class<?> getMapOutputValueClass(); void setMapOutputValueClass(Class<?> theClass); Class<?> getOutputKeyClass(); void setOutputKeyClass(Class<?> theClass); RawComparator getOutputKeyComparator(); void setOutputKeyComparatorClass(Class<? extends RawComparator> theClass); void setKeyFieldComparatorOptions(String keySpec); String getKeyFieldComparatorOption(); void setKeyFieldPartitionerOptions(String keySpec); String getKeyFieldPartitionerOption(); RawComparator getCombinerKeyGroupingComparator(); RawComparator getOutputValueGroupingComparator(); void setCombinerKeyGroupingComparator(
      Class<? extends RawComparator> theClass); void setOutputValueGroupingComparator(
      Class<? extends RawComparator> theClass); boolean getUseNewMapper(); void setUseNewMapper(boolean flag); boolean getUseNewReducer(); void setUseNewReducer(boolean flag); Class<?> getOutputValueClass(); void setOutputValueClass(Class<?> theClass); Class<? extends Mapper> getMapperClass(); void setMapperClass(Class<? extends Mapper> theClass); Class<? extends MapRunnable> getMapRunnerClass(); void setMapRunnerClass(Class<? extends MapRunnable> theClass); Class<? extends Partitioner> getPartitionerClass(); void setPartitionerClass(Class<? extends Partitioner> theClass); Class<? extends Reducer> getReducerClass(); void setReducerClass(Class<? extends Reducer> theClass); Class<? extends Reducer> getCombinerClass(); void setCombinerClass(Class<? extends Reducer> theClass); boolean getSpeculativeExecution(); void setSpeculativeExecution(boolean speculativeExecution); boolean getMapSpeculativeExecution(); void setMapSpeculativeExecution(boolean speculativeExecution); boolean getReduceSpeculativeExecution(); void setReduceSpeculativeExecution(boolean speculativeExecution); int getNumMapTasks(); void setNumMapTasks(int n); int getNumReduceTasks(); void setNumReduceTasks(int n); int getMaxMapAttempts(); void setMaxMapAttempts(int n); int getMaxReduceAttempts(); void setMaxReduceAttempts(int n); String getJobName(); void setJobName(String name); @Deprecated String getSessionId(); @Deprecated void setSessionId(String sessionId); void setMaxTaskFailuresPerTracker(int noFailures); int getMaxTaskFailuresPerTracker(); int getMaxMapTaskFailuresPercent(); void setMaxMapTaskFailuresPercent(int percent); int getMaxReduceTaskFailuresPercent(); void setMaxReduceTaskFailuresPercent(int percent); void setJobPriority(JobPriority prio); void setJobPriorityAsInteger(int prio); JobPriority getJobPriority(); int getJobPriorityAsInteger(); boolean getProfileEnabled(); void setProfileEnabled(boolean newValue); String getProfileParams(); void setProfileParams(String value); IntegerRanges getProfileTaskRange(boolean isMap); void setProfileTaskRange(boolean isMap, String newValue); void setMapDebugScript(String mDbgScript); String getMapDebugScript(); void setReduceDebugScript(String rDbgScript); String getReduceDebugScript(); String getJobEndNotificationURI(); void setJobEndNotificationURI(String uri); String getJobLocalDir(); long getMemoryForMapTask(); void setMemoryForMapTask(long mem); long getMemoryForReduceTask(); void setMemoryForReduceTask(long mem); String getQueueName(); void setQueueName(String queueName); static long normalizeMemoryConfigValue(long val); static String findContainingJar(Class my_class); @Deprecated long getMaxVirtualMemoryForTask(); @Deprecated void setMaxVirtualMemoryForTask(long vmem); @Deprecated long getMaxPhysicalMemoryForTask(); @Deprecated void setMaxPhysicalMemoryForTask(long mem); @Private String getTaskJavaOpts(TaskType taskType); @Private @VisibleForTesting static int parseMaximumHeapSizeMB(String javaOpts); @Private int getMemoryRequired(TaskType taskType); static void main(String[] args); @Deprecated
  static final String MAPRED_TASK_MAXVMEM_PROPERTY; @Deprecated
  static final String UPPER_LIMIT_ON_TASK_VMEM_PROPERTY; @Deprecated
  static final String MAPRED_TASK_DEFAULT_MAXVMEM_PROPERTY; @Deprecated
  static final String MAPRED_TASK_MAXPMEM_PROPERTY; @Deprecated
  static final long DISABLED_MEMORY_LIMIT; static final String MAPRED_LOCAL_DIR_PROPERTY; static final String DEFAULT_QUEUE_NAME; @Deprecated
  static final String MAPRED_JOB_MAP_MEMORY_MB_PROPERTY; @Deprecated
  static final String MAPRED_JOB_REDUCE_MEMORY_MB_PROPERTY; static final Pattern UNPACK_JAR_PATTERN_DEFAULT; @Deprecated
  static final String MAPRED_TASK_JAVA_OPTS; static final String MAPRED_MAP_TASK_JAVA_OPTS; static final String MAPRED_REDUCE_TASK_JAVA_OPTS; static final String DEFAULT_MAPRED_TASK_JAVA_OPTS; @Deprecated
  static final String MAPRED_TASK_ULIMIT; @Deprecated
  static final String MAPRED_MAP_TASK_ULIMIT; @Deprecated
  static final String MAPRED_REDUCE_TASK_ULIMIT; @Deprecated
  static final String MAPRED_TASK_ENV; static final String MAPRED_MAP_TASK_ENV; static final String MAPRED_REDUCE_TASK_ENV; static final String MAPRED_MAP_TASK_LOG_LEVEL; static final String MAPRED_REDUCE_TASK_LOG_LEVEL; static final Level DEFAULT_LOG_LEVEL; @Deprecated
  static final String WORKFLOW_ID; @Deprecated
  static final String WORKFLOW_NAME; @Deprecated
  static final String WORKFLOW_NODE_NAME; @Deprecated
  static final String WORKFLOW_ADJACENCY_PREFIX_STRING; @Deprecated
  static final String WORKFLOW_ADJACENCY_PREFIX_PATTERN; @Deprecated
  static final String WORKFLOW_TAGS; @Deprecated
  static final String MAPREDUCE_RECOVER_JOB; @Deprecated
  static final boolean DEFAULT_MAPREDUCE_RECOVER_JOB; }
@SuppressWarnings("deprecation") @Test (timeout=5000) public void testJobConf() { JobConf conf = new JobConf(); Pattern pattern = conf.getJarUnpackPattern(); assertEquals(Pattern.compile("(?:classes/|lib/).*").toString(), pattern.toString()); assertFalse(conf.getKeepFailedTaskFiles()); conf.setKeepFailedTaskFiles(true); assertTrue(conf.getKeepFailedTaskFiles()); assertNull(conf.getKeepTaskFilesPattern()); conf.setKeepTaskFilesPattern("123454"); assertEquals("123454", conf.getKeepTaskFilesPattern()); assertNotNull(conf.getWorkingDirectory()); conf.setWorkingDirectory(new Path("test")); assertTrue(conf.getWorkingDirectory().toString().endsWith("test")); assertEquals(1, conf.getNumTasksToExecutePerJvm()); assertNull(conf.getKeyFieldComparatorOption()); conf.setKeyFieldComparatorOptions("keySpec"); assertEquals("keySpec", conf.getKeyFieldComparatorOption()); assertFalse(conf.getUseNewReducer()); conf.setUseNewReducer(true); assertTrue(conf.getUseNewReducer()); assertTrue(conf.getMapSpeculativeExecution()); assertTrue(conf.getReduceSpeculativeExecution()); assertTrue(conf.getSpeculativeExecution()); conf.setReduceSpeculativeExecution(false); assertTrue(conf.getSpeculativeExecution()); conf.setMapSpeculativeExecution(false); assertFalse(conf.getSpeculativeExecution()); assertFalse(conf.getMapSpeculativeExecution()); assertFalse(conf.getReduceSpeculativeExecution()); conf.setSessionId("ses"); assertEquals("ses", conf.getSessionId()); assertEquals(3, conf.getMaxTaskFailuresPerTracker()); conf.setMaxTaskFailuresPerTracker(2); assertEquals(2, conf.getMaxTaskFailuresPerTracker()); assertEquals(0, conf.getMaxMapTaskFailuresPercent()); conf.setMaxMapTaskFailuresPercent(50); assertEquals(50, conf.getMaxMapTaskFailuresPercent()); assertEquals(0, conf.getMaxReduceTaskFailuresPercent()); conf.setMaxReduceTaskFailuresPercent(70); assertEquals(70, conf.getMaxReduceTaskFailuresPercent()); assertEquals(JobPriority.DEFAULT.name(), conf.getJobPriority().name()); conf.setJobPriority(JobPriority.HIGH); assertEquals(JobPriority.HIGH.name(), conf.getJobPriority().name()); assertNull(conf.getJobSubmitHostName()); conf.setJobSubmitHostName("hostname"); assertEquals("hostname", conf.getJobSubmitHostName()); assertNull(conf.getJobSubmitHostAddress()); conf.setJobSubmitHostAddress("ww"); assertEquals("ww", conf.getJobSubmitHostAddress()); assertFalse(conf.getProfileEnabled()); conf.setProfileEnabled(true); assertTrue(conf.getProfileEnabled()); assertEquals(conf.getProfileTaskRange(true).toString(), "0-2"); assertEquals(conf.getProfileTaskRange(false).toString(), "0-2"); conf.setProfileTaskRange(true, "0-3"); assertEquals(conf.getProfileTaskRange(false).toString(), "0-2"); assertEquals(conf.getProfileTaskRange(true).toString(), "0-3"); assertNull(conf.getMapDebugScript()); conf.setMapDebugScript("mDbgScript"); assertEquals("mDbgScript", conf.getMapDebugScript()); assertNull(conf.getReduceDebugScript()); conf.setReduceDebugScript("rDbgScript"); assertEquals("rDbgScript", conf.getReduceDebugScript()); assertNull(conf.getJobLocalDir()); assertEquals("default", conf.getQueueName()); conf.setQueueName("qname"); assertEquals("qname", conf.getQueueName()); conf.setMemoryForMapTask(100 * 1000); assertEquals(100 * 1000, conf.getMemoryForMapTask()); conf.setMemoryForReduceTask(1000 * 1000); assertEquals(1000 * 1000, conf.getMemoryForReduceTask()); assertEquals(-1, conf.getMaxPhysicalMemoryForTask()); assertEquals("The variable key is no longer used.", JobConf.deprecatedString("key")); assertEquals("mapreduce.map.java.opts should not be set by default", null, conf.get(JobConf.MAPRED_MAP_TASK_JAVA_OPTS)); assertEquals("mapreduce.reduce.java.opts should not be set by default", null, conf.get(JobConf.MAPRED_REDUCE_TASK_JAVA_OPTS)); }