|
||||||||||
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
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POMultiQueryPackage
public class POMultiQueryPackage
The package operator that packages the globally rearranged tuples into output format as required by multi-query de-multiplexer.
This operator is used when merging multiple Map-Reduce splittees into a Map-only splitter during multi-query optimization. The package operators of the reduce plans of the splittees form an indexed package list inside this operator. When this operator receives an input, it extracts the index from the key and calls the corresponding package to get the output data.
Due to the recursive nature of multi-query optimization, this operator may be contained in another multi-query packager.
The successor of this operator must be a PODemux operator which knows how to consume the output of this operator.
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, mBagFactory, 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 | |
---|---|
POMultiQueryPackage(OperatorKey k)
Constructs an operator with the specified key. |
|
POMultiQueryPackage(OperatorKey k,
int rp)
Constructs an operator with the specified key and degree of parallelism. |
|
POMultiQueryPackage(OperatorKey k,
int rp,
List<PhysicalOperator> inp)
Constructs an operator with the specified key, degree of parallelism and inputs. |
|
POMultiQueryPackage(OperatorKey k,
List<PhysicalOperator> inp)
Constructs an operator with the specified key and inputs. |
Method Summary | |
---|---|
void |
addIsKeyWrappedList(List<Boolean> lst)
Adds a list of IsKeyWrapped boolean values |
void |
addPackage(POPackage pack)
Appends the specified package object to the end of the package list. |
void |
addPackage(POPackage pack,
byte mapKeyType)
Appends the specified package object to the end of the package list. |
void |
attachInput(PigNullableWritable k,
Iterator<NullableTuple> inp)
Attaches the required inputs |
void |
detachInput()
attachInput's better half! |
List<Boolean> |
getIsKeyWrappedList()
Returns the list of booleans that indicates if the key needs to unwrapped for the corresponding plan. |
Result |
getNext(Tuple t)
Constructs the output tuple from the inputs. |
List<POPackage> |
getPackages()
Returns the list of packages. |
boolean |
isInCombiner()
|
boolean |
isSameMapKeyType()
|
String |
name()
|
void |
setInCombiner(boolean inCombiner)
|
void |
setSameMapKeyType(boolean sameMapKeyType)
|
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.relationalOperators.POPackage |
---|
clone, getInner, getKeyInfo, getKeyType, getNumInps, getPackageType, getValueTuple, illustratorMarkup, isDistinct, setDistinct, setInner, setKeyCompound, setKeyInfo, setKeyTuple, setKeyType, setNumInps, setPackageType, setUseSecondaryKey |
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 |
---|
public POMultiQueryPackage(OperatorKey k)
k
- the operator keypublic POMultiQueryPackage(OperatorKey k, int rp)
k
- the operator keyrp
- the degree of parallelism requestedpublic POMultiQueryPackage(OperatorKey k, List<PhysicalOperator> inp)
k
- the operator keyinp
- the inputs that this operator will read data frompublic POMultiQueryPackage(OperatorKey k, int rp, List<PhysicalOperator> inp)
k
- the operator keyrp
- the degree of parallelism requestedinp
- the inputs that this operator will read data fromMethod Detail |
---|
public String name()
name
in class POPackage
public boolean supportsMultipleInputs()
Operator
supportsMultipleInputs
in class POPackage
public void visit(PhyPlanVisitor v) throws VisitorException
Operator
visit
in class POPackage
v
- Visitor to visit with.
VisitorException
- if the visitor has a problem.public boolean supportsMultipleOutputs()
Operator
supportsMultipleOutputs
in class POPackage
public void attachInput(PigNullableWritable k, Iterator<NullableTuple> inp)
POPackage
attachInput
in class POPackage
k
- - the key being worked oninp
- - iterator of indexed tuples typically
obtained from Hadooppublic void detachInput()
POPackage
detachInput
in class POPackage
public void addPackage(POPackage pack)
pack
- package to be appended to the listpublic void addPackage(POPackage pack, byte mapKeyType)
pack
- package to be appended to the listmapKeyType
- the map key type associated with the packagepublic List<POPackage> getPackages()
public Result getNext(Tuple t) throws ExecException
The output is consumed by for the demultiplexer operator (PODemux) in the format (key, {bag of tuples}) where key is an indexed WritableComparable, not the wrapped value as a pig type.
getNext
in class POPackage
ExecException
public List<Boolean> getIsKeyWrappedList()
public void addIsKeyWrappedList(List<Boolean> lst)
lst
- the list of boolean values to addpublic void setInCombiner(boolean inCombiner)
public boolean isInCombiner()
public void setSameMapKeyType(boolean sameMapKeyType)
public boolean isSameMapKeyType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |