public class POMultiQueryPackage extends POPackage
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.
POPackage.PackageTypePhysicalOperator.OriginalLocationdistinct, isKeyCompound, isKeyTuple, keyAsTuple, keyInfo, mBagFactory, mTupleFactoryalias, illustrator, input, inputAttached, inputs, lineageTracer, outputs, parentPlan, pigLogger, requestedParallelism, res, resultType| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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 |
getNextTuple()
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.
|
clone, getInner, getKeyInfo, getKeyType, getNumInps, getPackageType, getValueTuple, illustratorMarkup, isDistinct, setDistinct, setInner, setKeyCompound, setKeyInfo, setKeyTuple, setKeyType, setNumInps, setPackageType, setUseSecondaryKeyaddOriginalLocation, 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, setIllustrator, setInputs, setParentPlan, setPigLogger, setReporter, setRequestedParallelism, setResultTypecompareTo, equals, getOperatorKey, getProjectionMap, hashCode, regenerateProjectionMap, rewire, toString, unsetProjectionMappublic 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 frompublic boolean supportsMultipleInputs()
OperatorsupportsMultipleInputs in class POPackagepublic void visit(PhyPlanVisitor v) throws VisitorException
Operatorvisit in class POPackagev - Visitor to visit with.VisitorException - if the visitor has a problem.public boolean supportsMultipleOutputs()
OperatorsupportsMultipleOutputs in class POPackagepublic void attachInput(PigNullableWritable k, Iterator<NullableTuple> inp)
POPackageattachInput in class POPackagek - - the key being worked oninp - - iterator of indexed tuples typically
obtained from Hadooppublic void detachInput()
POPackagedetachInput in class POPackagepublic 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 getNextTuple() 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.
getNextTuple in class POPackageExecExceptionpublic 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()
Copyright © 2007-2012 The Apache Software Foundation