org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators
Class JoinPackager
java.lang.Object
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.Packager
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.JoinPackager
- All Implemented Interfaces:
- Serializable, Cloneable, Illustrable
public class JoinPackager
- extends Packager
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.Packager |
Packager.PackageType |
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.Packager |
checkBagType, clone, detachInput, getBag, getIllustrator, getInner, getKey, getKey, getKeyAsTuple, getKeyInfo, getKeyTuple, getKeyType, getNumInputs, getNumInputs, getPackageType, getValueTuple, illustratorMarkup, illustratorMarkup2, isDistinct, numberOfEquivalenceClasses, setDistinct, setInner, setKeyCompound, setKeyInfo, setKeyTuple, setKeyType, setNumInputs, setPackageType, setParent, setUseSecondaryKey, starMarkup |
DEFAULT_CHUNK_SIZE
public static final String DEFAULT_CHUNK_SIZE
- See Also:
- Constant Field Values
JoinPackager
public JoinPackager(Packager p,
POForEach f)
getNext
public Result getNext()
throws ExecException
- Calls getNext to get next ForEach result. The input for POJoinPackage is
a (key, NullableTuple) pair. We will materialize n-1 inputs into bags, feed input#n
one tuple a time to the delegated ForEach operator, the input for ForEach is
(input#1, input#2, input#3....input#n[i]), i=(1..k), suppose input#n consists
of k tuples.
For every ForEach input, pull all the results from ForEach.
getNext will be called multiple times for a particular input,
it returns one output tuple from ForEach every time we call getNext,
so we need to maintain internal status to keep tracking of where we are.
- Overrides:
getNext
in class Packager
- Throws:
ExecException
attachInput
public void attachInput(Object key,
DataBag[] bags,
boolean[] readOnce)
throws ExecException
- Overrides:
attachInput
in class Packager
- Throws:
ExecException
getInputPlans
public List<PhysicalPlan> getInputPlans()
setInputPlans
public void setInputPlans(List<PhysicalPlan> plans)
setToBeFlattened
public void setToBeFlattened(List<Boolean> flattens)
getForEach
public POOptimizedForEach getForEach()
- Returns:
- the forEach
setChunkSize
public void setChunkSize(long chunkSize)
- Parameters:
chunkSize
- - the chunk size for the biggest input
setIllustrator
public void setIllustrator(Illustrator illustrator)
- Specified by:
setIllustrator
in interface Illustrable
- Overrides:
setIllustrator
in class Packager
name
public String name()
- Overrides:
name
in class Packager
Copyright © 2007-2012 The Apache Software Foundation