public class MultiQueryPackager extends Packager
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.
Packager.PackageType
bags, distinct, illustrator, isKeyCompound, isKeyTuple, keyInfo, mBagFactory, mTupleFactory, parent, readOnce
Constructor and Description |
---|
MultiQueryPackager() |
Modifier and Type | Method and Description |
---|---|
void |
addIsKeyWrappedList(List<Boolean> lst)
Adds a list of IsKeyWrapped boolean values
|
void |
addPackager(Packager pkgr)
Appends the specified package object to the end of
the package list.
|
void |
addPackager(Packager pkgr,
byte mapKeyType)
Appends the specified package object to the end of
the package list.
|
List<Boolean> |
getIsKeyWrappedList()
Returns the list of booleans that indicates if the
key needs to unwrapped for the corresponding plan.
|
Result |
getNext()
Constructs the output tuple from the inputs.
|
int |
getNumInputs(byte index) |
List<Packager> |
getPackagers()
Returns the list of packages.
|
Tuple |
getValueTuple(PigNullableWritable keyWritable,
NullableTuple ntup,
int origIndex) |
boolean |
isInCombiner() |
boolean |
isSameMapKeyType() |
void |
setInCombiner(boolean inCombiner) |
void |
setSameMapKeyType(boolean sameMapKeyType) |
attachInput, checkBagType, clone, detachInput, getBag, getIllustrator, getInner, getKey, getKey, getKeyAsTuple, getKeyInfo, getKeyTuple, getKeyType, getNumInputs, getPackageType, getUseSecondaryKey, illustratorMarkup, illustratorMarkup2, isDistinct, name, numberOfEquivalenceClasses, setDistinct, setIllustrator, setInner, setKeyCompound, setKeyInfo, setKeyTuple, setKeyType, setNumInputs, setPackageType, setParent, setUseSecondaryKey, starMarkup
public void addPackager(Packager pkgr)
pack
- package to be appended to the listpublic void addPackager(Packager pkgr, byte mapKeyType)
pack
- package to be appended to the listmapKeyType
- the map key type associated with the packagepublic List<Packager> getPackagers()
public Result getNext() 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 Packager
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()
public int getNumInputs(byte index)
getNumInputs
in class Packager
public Tuple getValueTuple(PigNullableWritable keyWritable, NullableTuple ntup, int origIndex) throws ExecException
getValueTuple
in class Packager
ExecException
Copyright © 2007-2012 The Apache Software Foundation