Author: pradeepkth
Date: Thu Feb  4 22:33:27 2010
New Revision: 906695

URL: http://svn.apache.org/viewvc?rev=906695&view=rev
Log:
minor fixes in POMergeJoin and WeightedRangePartitioner

Modified:
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/partitioners/WeightedRangePartitioner.java
    
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POMergeJoin.java

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/partitioners/WeightedRangePartitioner.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/partitioners/WeightedRangePartitioner.java?rev=906695&r1=906694&r2=906695&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/partitioners/WeightedRangePartitioner.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/partitioners/WeightedRangePartitioner.java
 Thu Feb  4 22:33:27 2010
@@ -21,6 +21,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
@@ -124,7 +125,15 @@
                 FileSpec fileSpec = inp.get(0);
                 LoadFunc inpLoad =
                     
(LoadFunc)PigContext.instantiateFuncFromSpec(fileSpec.getFuncSpec());
-
+                List<String> inpSignatureLists = 
+                    (ArrayList<String>)ObjectSerializer.deserialize(
+                            job.get("pig.inpSignatures"));
+                // signature can be null for intermediate jobs where it will 
not
+                // be required to be passed down
+                if(inpSignatureLists.get(0) != null) {
+                    inpLoad.setUDFContextSignature(inpSignatureLists.get(0));
+                }
+                
                 ReadToEndLoader r2eLoad = new ReadToEndLoader(inpLoad, job, 
                         fileSpec.getFileName(), 0);
 

Modified: 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POMergeJoin.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POMergeJoin.java?rev=906695&r1=906694&r2=906695&view=diff
==============================================================================
--- 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POMergeJoin.java
 (original)
+++ 
hadoop/pig/branches/load-store-redesign/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POMergeJoin.java
 Thu Feb  4 22:33:27 2010
@@ -401,8 +401,9 @@
         // make a copy of the conf to use in calls to rightLoader.
         Configuration conf = new Configuration(PigMapReduce.sJobConf);
         rightLoader.setUDFContextSignature(signature);
-        rightLoader.setLocation(rightInputFileName, new Job(conf));
-        rightLoader.initialize(conf);
+        Job job = new Job(conf);
+        rightLoader.setLocation(rightInputFileName, job);
+        rightLoader.initialize(job.getConfiguration());
         rightLoader.seekNear(
                 firstLeftKey instanceof Tuple ? (Tuple)firstLeftKey : 
mTupleFactory.newTuple(firstLeftKey));
     }


Reply via email to