|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.impl.plan.Operator<PhyPlanVisitor>
org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POPackage
public class POPackage
The package operator that packages the globally rearranged tuples into output format as required by co-group. This is last stage of processing co-group. This operator has a slightly different format than other operators in that, it takes two things as input. The key being worked on and the iterator of bags that contain indexed tuples that just need to be packaged into their appropriate output bags based on the index.
Nested Class Summary | |
---|---|
static class |
POPackage.PackageType
|
Nested classes/interfaces inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
---|
PhysicalOperator.OriginalLocation |
Field Summary | |
---|---|
protected boolean |
distinct
|
protected boolean |
isKeyCompound
|
protected boolean |
isKeyTuple
|
protected Tuple |
keyAsTuple
|
protected Map<Integer,Pair<Boolean,Map<Integer,Integer>>> |
keyInfo
|
protected static BagFactory |
mBagFactory
|
protected static TupleFactory |
mTupleFactory
|
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 | |
---|---|
POPackage(OperatorKey k)
|
|
POPackage(OperatorKey k,
int rp)
|
|
POPackage(OperatorKey k,
int rp,
List<PhysicalOperator> inp)
|
|
POPackage(OperatorKey k,
List<PhysicalOperator> inp)
|
Method Summary | |
---|---|
void |
attachInput(PigNullableWritable k,
Iterator<NullableTuple> inp)
Attaches the required inputs |
POPackage |
clone()
Make a deep copy of this operator. |
void |
detachInput()
attachInput's better half! |
boolean[] |
getInner()
|
Map<Integer,Pair<Boolean,Map<Integer,Integer>>> |
getKeyInfo()
|
byte |
getKeyType()
|
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}, ...) |
int |
getNumInps()
|
POPackage.PackageType |
getPackageType()
|
protected Tuple |
getValueTuple(NullableTuple ntup,
int index)
|
Tuple |
illustratorMarkup(Object in,
Object out,
int eqClassIndex)
input tuple mark up to be illustrate-able |
boolean |
isDistinct()
|
String |
name()
|
void |
setDistinct(boolean distinct)
|
void |
setInner(boolean[] inner)
|
void |
setKeyCompound(boolean keyCompound)
|
void |
setKeyInfo(Map<Integer,Pair<Boolean,Map<Integer,Integer>>> keyInfo)
|
void |
setKeyTuple(boolean keyTuple)
|
void |
setKeyType(byte keyType)
|
void |
setNumInps(int numInps)
|
void |
setPackageType(POPackage.PackageType type)
|
void |
setUseSecondaryKey(boolean useSecondaryKey)
|
boolean |
supportsMultipleInputs()
Indicates whether this operator supports multiple inputs. |
boolean |
supportsMultipleOutputs()
Indicates whether this operator supports multiple outputs. |
void |
visit(PhyPlanVisitor v)
Visit this node with the provided visitor. |
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 |
Field Detail |
---|
protected boolean isKeyTuple
protected boolean isKeyCompound
protected Tuple keyAsTuple
protected boolean distinct
protected Map<Integer,Pair<Boolean,Map<Integer,Integer>>> keyInfo
protected static final BagFactory mBagFactory
protected static final TupleFactory mTupleFactory
Constructor Detail |
---|
public POPackage(OperatorKey k)
public POPackage(OperatorKey k, int rp)
public POPackage(OperatorKey k, List<PhysicalOperator> inp)
public POPackage(OperatorKey k, int rp, List<PhysicalOperator> inp)
Method Detail |
---|
public String name()
name
in class Operator<PhyPlanVisitor>
public boolean supportsMultipleInputs()
Operator
supportsMultipleInputs
in class Operator<PhyPlanVisitor>
public void visit(PhyPlanVisitor v) throws VisitorException
Operator
visit
in class PhysicalOperator
v
- Visitor to visit with.
VisitorException
- if the visitor has a problem.public boolean supportsMultipleOutputs()
Operator
supportsMultipleOutputs
in class Operator<PhyPlanVisitor>
public void attachInput(PigNullableWritable k, Iterator<NullableTuple> inp)
k
- - the key being worked oninp
- - iterator of indexed tuples typically
obtained from Hadooppublic void detachInput()
detachInput
in class PhysicalOperator
public int getNumInps()
public void setNumInps(int numInps)
public boolean[] getInner()
public void setInner(boolean[] inner)
public Result getNext(Tuple t) throws ExecException
getNext
in class PhysicalOperator
ExecException
protected Tuple getValueTuple(NullableTuple ntup, int index) throws ExecException
ExecException
public byte getKeyType()
public void setKeyType(byte keyType)
public POPackage clone() throws CloneNotSupportedException
clone
in class PhysicalOperator
CloneNotSupportedException
Do not use the clone method directly. Operators are cloned when logical plans
are cloned using {@link LogicalPlanCloner}
public void setKeyInfo(Map<Integer,Pair<Boolean,Map<Integer,Integer>>> keyInfo)
keyInfo
- the keyInfo to setpublic void setKeyTuple(boolean keyTuple)
keyTuple
- the keyTuple to setpublic void setKeyCompound(boolean keyCompound)
keyCompound
- the keyCompound to setpublic Map<Integer,Pair<Boolean,Map<Integer,Integer>>> getKeyInfo()
public boolean isDistinct()
public void setDistinct(boolean distinct)
distinct
- the distinct to setpublic void setUseSecondaryKey(boolean useSecondaryKey)
public void setPackageType(POPackage.PackageType type)
public POPackage.PackageType getPackageType()
public Tuple illustratorMarkup(Object in, Object out, int eqClassIndex)
Illustrable
in
- input tupleout
- output tuple before wrapped in ExampleTupleeqClassIndex
- index into equivalence classes in illustrator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |