Author: olga
Date: Tue Aug 26 08:25:20 2008
New Revision: 689110

URL: http://svn.apache.org/viewvc?rev=689110&view=rev
Log:
PIG-397: code defaults to single reducer

Modified:
    incubator/pig/branches/types/CHANGES.txt
    
incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java

Modified: incubator/pig/branches/types/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/CHANGES.txt?rev=689110&r1=689109&r2=689110&view=diff
==============================================================================
--- incubator/pig/branches/types/CHANGES.txt (original)
+++ incubator/pig/branches/types/CHANGES.txt Tue Aug 26 08:25:20 2008
@@ -173,3 +173,5 @@
     PIG-353: parsing of complex types
 
     PIG-392: error handling with multiple MRjobs
+
+    PIG-397: code defaults to single reducer

Modified: 
incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java
URL: 
http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java?rev=689110&r1=689109&r2=689110&view=diff
==============================================================================
--- 
incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java
 (original)
+++ 
incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java
 Tue Aug 26 08:25:20 2008
@@ -273,7 +273,9 @@
                 mro.reducePlan.remove(pack);
                 jobConf.setMapperClass(PigMapReduce.Map.class);
                 jobConf.setReducerClass(PigMapReduce.Reduce.class);
-                
jobConf.setNumReduceTasks((mro.requestedParallelism>0)?mro.requestedParallelism:1);
+                if (mro.requestedParallelism>0)
+                    jobConf.setNumReduceTasks(mro.requestedParallelism);
+
                 jobConf.set("pig.mapPlan", 
ObjectSerializer.serialize(mro.mapPlan));
                 jobConf.set("pig.reducePlan", 
ObjectSerializer.serialize(mro.reducePlan));
                 jobConf.set("pig.reduce.package", 
ObjectSerializer.serialize(pack));


Reply via email to