code: private static JobConf createJobConf(Configuration conf, boolean useFastCopy) {
      Class<? extends InputFormat> inputFormat =
        (useFastCopy) ? FastCopyInputFormat.class : CopyInputFormat.class;
      JobConf jobconf = new JobConf(conf, DistCp.class);
      jobconf.setJobName(NAME);
  
      // turn off speculative execution, because DFS doesn't handle
      // multiple writers to the same file.
      jobconf.setReduceSpeculativeExecution(false);
      jobconf.setMapOutputKeyClass(FilePairComparable.class);
      jobconf.setMapOutputValueClass(Text.class);
      jobconf.setOutputKeyClass(FilePairComparable.class);
      jobconf.setOutputValueClass(Text.class);
  
      jobconf.setInputFormat(inputFormat);
      jobconf.setMapperClass(CopyFilesTask.class);
      jobconf.setReducerClass(CopyFilesTask.class);
        
      // Prevent the reducer from starting until all maps are done.
      jobconf.setInt("mapred.job.rushreduce.reduce.threshold", 0);
      jobconf.setFloat("mapred.reduce.slowstart.completed.maps", 1.0f);
      
      return jobconf;
    }
docs: Job configuration