Review Board 1.7.22


Refactor physical operators to remove methods parameters that are always null

Review Request #11203 - Created May 16, 2013 and updated

Julien Le Dem
PIG-3307
Reviewers
pig
billgraham, cheolsoo, daijy, dvryaboy
pig-git
Refactor physical operators to remove methods parameters that are always null
test-commit

Diff revision 1 (Latest)

  1. src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MergeJoinIndexer.java: Loading...
  2. src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigCombiner.java: Loading...
  3. src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigGenericMapBase.java: Loading...
  4. src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigGenericMapReduce.java: Loading...
  5. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/PhysicalOperator.java: Loading...
  6. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Add.java: Loading...
  7. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/BinaryComparisonOperator.java: Loading...
  8. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/ComparisonOperator.java: Loading...
  9. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/ConstantExpression.java: Loading...
  10. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Divide.java: Loading...
  11. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/EqualToExpr.java: Loading...
  12. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/ExpressionOperator.java: Loading...
  13. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/GTOrEqualToExpr.java: Loading...
  14. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/GreaterThanExpr.java: Loading...
  15. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/LTOrEqualToExpr.java: Loading...
  16. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/LessThanExpr.java: Loading...
  17. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Mod.java: Loading...
  18. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Multiply.java: Loading...
  19. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/NotEqualToExpr.java: Loading...
  20. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POAnd.java: Loading...
This diff has been split across 5 pages: 1 2 3 4 5 >
src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MergeJoinIndexer.java
Revision d5aff3d New Change
[20] 52 lines
[+20] [+] public class MergeJoinIndexer extends LoadFunc{
53
    private POLocalRearrange lr;
53
    private POLocalRearrange lr;
54
    private PhysicalPlan precedingPhyPlan;
54
    private PhysicalPlan precedingPhyPlan;
55
    private int keysCnt;
55
    private int keysCnt;
56
    private PhysicalOperator rightPipelineLeaf;
56
    private PhysicalOperator rightPipelineLeaf;
57
    private PhysicalOperator rightPipelineRoot;
57
    private PhysicalOperator rightPipelineRoot;
58
    private Tuple dummyTuple = null;

   
59
    private LoadFunc loader;
58
    private LoadFunc loader;
60
    private PigSplit pigSplit = null;
59
    private PigSplit pigSplit = null;
61
    private boolean ignoreNullKeys;
60
    private boolean ignoreNullKeys;
62
    
61
    
63
    /** @param funcSpec : Loader specification.
62
    /** @param funcSpec : Loader specification.
[+20] [20] 58 lines
[+20] [+] public Tuple getNext() throws IOException {
122
            }
121
            }
123

    
   
122

   
124
            if (null == precedingPhyPlan){
123
            if (null == precedingPhyPlan){
125

    
   
124

   
126
                lr.attachInput(readTuple);
125
                lr.attachInput(readTuple);
127
                key = ((Tuple)lr.getNext(dummyTuple).result).get(1);
126
                key = ((Tuple)lr.getNextTuple().result).get(1);
128
                lr.detachInput();
127
                lr.detachInput();
129
                if ( null == key && ignoreNullKeys) // Tuple with null key. Drop it.
128
                if ( null == key && ignoreNullKeys) // Tuple with null key. Drop it.
130
                    continue;
129
                    continue;
131
                break;      
130
                break;      
132
            }
131
            }
133

    
   
132

   
134
            // There is a physical plan. 
133
            // There is a physical plan. 
135

    
   
134

   
136
            rightPipelineRoot.attachInput(readTuple);
135
            rightPipelineRoot.attachInput(readTuple);
137
            boolean fetchNewTup;
136
            boolean fetchNewTup;
138

    
   
137

   
139
            while(true){
138
            while(true){
140

    
   
139

   
141
                Result res = rightPipelineLeaf.getNext(dummyTuple);
140
                Result res = rightPipelineLeaf.getNextTuple();
142
                switch(res.returnStatus){
141
                switch(res.returnStatus){
143

    
   
142

   
144
                case POStatus.STATUS_OK:
143
                case POStatus.STATUS_OK:
145

    
   
144

   
146
                    lr.attachInput((Tuple)res.result);
145
                    lr.attachInput((Tuple)res.result);
147
                    key = ((Tuple)lr.getNext(dummyTuple).result).get(1);
146
                    key = ((Tuple)lr.getNextTuple().result).get(1);
148
                    lr.detachInput();
147
                    lr.detachInput();
149
                    if ( null == key && ignoreNullKeys) // Tuple with null key. Drop it.
148
                    if ( null == key && ignoreNullKeys) // Tuple with null key. Drop it.
150
                        continue;
149
                        continue;
151
                     fetchNewTup = false;
150
                     fetchNewTup = false;
152
                    break;
151
                    break;
[+20] [20] 64 lines
src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigCombiner.java
Revision 6cfc8c0 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigGenericMapBase.java
Revision 7c499f6 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigGenericMapReduce.java
Revision 6145214 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/PhysicalOperator.java
Revision fc0112a New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Add.java
Revision 5bceca6 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/BinaryComparisonOperator.java
Revision 3e434f3 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/ComparisonOperator.java
Revision 51d9f34 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/ConstantExpression.java
Revision 7e4cffa New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Divide.java
Revision bdcc72b New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/EqualToExpr.java
Revision a767c36 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/ExpressionOperator.java
Revision 9cca2c3 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/GTOrEqualToExpr.java
Revision b5e3c83 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/GreaterThanExpr.java
Revision f3b5d44 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/LTOrEqualToExpr.java
Revision 35786c0 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/LessThanExpr.java
Revision c9b3157 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Mod.java
Revision 1108846 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Multiply.java
Revision 2795b78 New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/NotEqualToExpr.java
Revision 294f84a New Change
 
src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POAnd.java
Revision f24c2ac New Change
 
  1. src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MergeJoinIndexer.java: Loading...
  2. src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigCombiner.java: Loading...
  3. src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigGenericMapBase.java: Loading...
  4. src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigGenericMapReduce.java: Loading...
  5. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/PhysicalOperator.java: Loading...
  6. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Add.java: Loading...
  7. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/BinaryComparisonOperator.java: Loading...
  8. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/ComparisonOperator.java: Loading...
  9. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/ConstantExpression.java: Loading...
  10. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Divide.java: Loading...
  11. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/EqualToExpr.java: Loading...
  12. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/ExpressionOperator.java: Loading...
  13. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/GTOrEqualToExpr.java: Loading...
  14. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/GreaterThanExpr.java: Loading...
  15. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/LTOrEqualToExpr.java: Loading...
  16. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/LessThanExpr.java: Loading...
  17. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Mod.java: Loading...
  18. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/Multiply.java: Loading...
  19. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/NotEqualToExpr.java: Loading...
  20. src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POAnd.java: Loading...
This diff has been split across 5 pages: 1 2 3 4 5 >