|
||||||||||
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 |
---|
Nested classes/interfaces inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
---|
PhysicalOperator.OriginalLocation |
Field Summary | |
---|---|
protected Object |
key
|
protected static BagFactory |
mBagFactory
|
protected static TupleFactory |
mTupleFactory
|
protected int |
numInputs
|
protected Packager |
pkgr
|
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
---|
alias, illustrator, input, inputAttached, inputs, lineageTracer, outputs, parentPlan, pigLogger, 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,
int rp,
List<PhysicalOperator> inp,
Packager pkgr)
|
|
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! |
Result |
getNextTuple()
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()
|
Packager |
getPkgr()
|
Tuple |
illustratorMarkup(Object in,
Object out,
int eqClassIndex)
input tuple mark up to be illustrate-able |
String |
name()
|
int |
numberOfEquivalenceClasses()
|
void |
setIllustrator(Illustrator illustrator)
|
void |
setNumInps(int numInps)
|
void |
setPkgr(Packager pkgr)
|
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, getIllustrator, getInputs, getLogger, getNext, getNextBigDecimal, getNextBigInteger, getNextBoolean, getNextDataBag, getNextDataByteArray, getNextDateTime, getNextDouble, getNextFloat, getNextInteger, getNextLong, getNextMap, getNextString, getOriginalLocations, getPigLogger, getReporter, getRequestedParallelism, getResultType, isAccumStarted, isAccumulative, isBlocking, isInputAttached, processInput, reset, setAccumEnd, setAccumStart, setAccumulative, 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 Object key
protected int numInputs
protected static final BagFactory mBagFactory
protected static final TupleFactory mTupleFactory
protected Packager pkgr
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)
public POPackage(OperatorKey k, int rp, List<PhysicalOperator> inp, Packager pkgr)
Method Detail |
---|
public void setIllustrator(Illustrator illustrator)
setIllustrator
in interface Illustrable
setIllustrator
in class PhysicalOperator
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 Result getNextTuple() throws ExecException
getNextTuple
in class PhysicalOperator
ExecException
public Packager getPkgr()
public void setPkgr(Packager pkgr)
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 Tuple illustratorMarkup(Object in, Object out, int eqClassIndex)
Illustrable
in
- input tupleout
- output tuple before wrapped in ExampleTupleeqClassIndex
- index into equivalence classes in illustrator
public int numberOfEquivalenceClasses()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |