org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators
Class POCombinerPackage

java.lang.Object
  extended by org.apache.pig.impl.plan.Operator<PhyPlanVisitor>
      extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
          extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POPackage
              extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POCombinerPackage
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Operator>, Illustrable

public class POCombinerPackage
extends POPackage

The package operator that packages the globally rearranged tuples into output format after the combiner stage. It differs from POPackage in that it does not use the index in the NullableTuple to find the bag to put a tuple in. Instead, the inputs are put in a bag corresponding to their offset in the tuple.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POPackage
POPackage.PackageType
 
Nested classes/interfaces inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
PhysicalOperator.OriginalLocation
 
Field Summary
 
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POPackage
distinct, isKeyCompound, isKeyTuple, keyAsTuple, keyInfo
 
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
alias, dummyBag, dummyBool, dummyDateTime, dummyDBA, dummyDouble, dummyFloat, dummyInt, dummyLong, dummyMap, dummyString, dummyTuple, illustrator, input, inputAttached, inputs, lineageTracer, outputs, parentPlan, pigLogger, reporter, requestedParallelism, res, resultType
 
Fields inherited from class org.apache.pig.impl.plan.Operator
mKey
 
Constructor Summary
POCombinerPackage(POPackage pkg, boolean[] bags)
          A new POPostCombinePackage will be constructed as a near clone of the provided POPackage.
 
Method Summary
 Result getNext(Tuple t)
          From the inputs, constructs the output tuple for this co-group in the required format which is (key, {bag of tuples from input 1}, {bag of tuples from input 2}, ...)
 String name()
           
 void setKeyInfo(Map<Integer,Pair<Boolean,Map<Integer,Integer>>> keyInfo)
           
 void visit(PhyPlanVisitor v)
          Visit this node with the provided visitor.
 
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POPackage
attachInput, clone, detachInput, getInner, getKeyInfo, getKeyType, getNumInps, getPackageType, getValueTuple, illustratorMarkup, isDistinct, setDistinct, setInner, setKeyCompound, setKeyTuple, setKeyType, setNumInps, setPackageType, setUseSecondaryKey, supportsMultipleInputs, supportsMultipleOutputs
 
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
addOriginalLocation, addOriginalLocation, attachInput, cloneHelper, getAlias, getAliasString, getDummy, getIllustrator, getInputs, getLogger, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getOriginalLocations, getPigLogger, getRequestedParallelism, getResultType, isAccumStarted, isAccumulative, isBlocking, isInputAttached, processInput, reset, setAccumEnd, setAccumStart, setAccumulative, setIllustrator, setInputs, setParentPlan, setPigLogger, setReporter, setRequestedParallelism, setResultType
 
Methods inherited from class org.apache.pig.impl.plan.Operator
compareTo, equals, getOperatorKey, getProjectionMap, hashCode, regenerateProjectionMap, rewire, toString, unsetProjectionMap
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

POCombinerPackage

public POCombinerPackage(POPackage pkg,
                         boolean[] bags)
A new POPostCombinePackage will be constructed as a near clone of the provided POPackage.

Parameters:
pkg - POPackage to clone.
bags - for each field, indicates whether it should be a bag (true) or a simple field (false).
Method Detail

name

public String name()
Overrides:
name in class POPackage

visit

public void visit(PhyPlanVisitor v)
           throws VisitorException
Description copied from class: Operator
Visit this node with the provided visitor. This should only be called by the visitor class itself, never directly.

Overrides:
visit in class POPackage
Parameters:
v - Visitor to visit with.
Throws:
VisitorException - if the visitor has a problem.

setKeyInfo

public void setKeyInfo(Map<Integer,Pair<Boolean,Map<Integer,Integer>>> keyInfo)
Overrides:
setKeyInfo in class POPackage
Parameters:
keyInfo - the keyInfo to set

getNext

public Result getNext(Tuple t)
               throws ExecException
Description copied from class: POPackage
From the inputs, constructs the output tuple for this co-group in the required format which is (key, {bag of tuples from input 1}, {bag of tuples from input 2}, ...)

Overrides:
getNext in class POPackage
Throws:
ExecException


Copyright © 2007-2012 The Apache Software Foundation