Kaynağa Gözat

MAPREDUCE-6009. Map-only job with new-api runs wrong OutputCommitter when cleanup scheduled in a reduce slot (Gera Shegalov via Sandy Ryza)

Sandy Ryza 10 yıl önce
ebeveyn
işleme
9944fe44d9

+ 2 - 2
src/mapred/org/apache/hadoop/mapreduce/Job.java

@@ -521,9 +521,9 @@ public class Job extends JobContext {
         ensureNotSet(JobContext.OUTPUT_FORMAT_CLASS_ATTR, mode);
       }
     }
+    conf.setBooleanIfUnset("mapred.reducer.new-api",
+                           conf.get(oldReduceClass) == null);
     if (numReduces != 0) {
-      conf.setBooleanIfUnset("mapred.reducer.new-api",
-                             conf.get(oldReduceClass) == null);
       if (conf.getUseNewReducer()) {
         String mode = "new reduce API";
         ensureNotSet("mapred.output.format.class", mode);