org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators
Class POCombinerPackage
java.lang.Object
org.apache.pig.impl.plan.Operator<PhyPlanVisitor>
org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POPackage
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POCombinerPackage
- All Implemented Interfaces:
- Serializable, Cloneable, Comparable<Operator>
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 classes/interfaces inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POPackage |
POPackage.PackageType |
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
alias, dummyBag, dummyBool, dummyDBA, dummyDouble, dummyFloat, dummyInt, dummyLong, dummyMap, dummyString, dummyTuple, 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,
boolean[] keyPos)
A new POPostCombinePackage will be constructed as a near clone of the
provided POPackage. |
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POPackage |
attachInput, clone, detachInput, getInner, getKeyInfo, getKeyType, getNumInps, getPackageType, getValueTuple, isDistinct, setDistinct, setInner, setKeyTuple, setKeyType, setNumInps, setPackageType, setUseSecondaryKey, supportsMultipleInputs, supportsMultipleOutputs |
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
attachInput, cloneHelper, getAlias, getAliasString, getInputs, getLogger, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getPigLogger, getRequestedParallelism, getResultType, isAccumStarted, isAccumulative, isBlocking, isInputAttached, processInput, reset, setAccumEnd, setAccumStart, setAccumulative, setAlias, setInputs, setLineageTracer, setParentPlan, setPigLogger, setReporter, setRequestedParallelism, setResultType |
POCombinerPackage
public POCombinerPackage(POPackage pkg,
boolean[] bags,
boolean[] keyPos)
- 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).keyPos
- for each field in the output tuple of the foreach operator,
indicates whether it's the group key.
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
getKeyPositionsInTuple
public boolean[] getKeyPositionsInTuple()
- Description copied from class:
POPackage
- Get the field positions of key in the output tuples.
For POPackage, the position is always 0. The POCombinerPackage,
however, can return different values.
- Overrides:
getKeyPositionsInTuple
in class POPackage
- Returns:
- the field position of key in the output tuples.
Copyright © ${year} The Apache Software Foundation