org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators
Class JoinPackager

java.lang.Object
  extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.Packager
      extended by 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 Class Summary
 
Nested classes/interfaces inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.Packager
Packager.PackageType
 
Field Summary
static String DEFAULT_CHUNK_SIZE
           
 
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.Packager
bags, distinct, illustrator, isKeyCompound, isKeyTuple, keyInfo, mBagFactory, mTupleFactory, parent, readOnce
 
Constructor Summary
JoinPackager(Packager p, POForEach f)
           
 
Method Summary
 void attachInput(Object key, DataBag[] bags, boolean[] readOnce)
           
 POOptimizedForEach getForEach()
           
 List<PhysicalPlan> getInputPlans()
           
 Result getNext()
          Calls getNext to get next ForEach result.
 String name()
           
 void setChunkSize(long chunkSize)
           
 void setIllustrator(Illustrator illustrator)
           
 void setInputPlans(List<PhysicalPlan> plans)
           
 void setToBeFlattened(List<Boolean> flattens)
           
 
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CHUNK_SIZE

public static final String DEFAULT_CHUNK_SIZE
See Also:
Constant Field Values
Constructor Detail

JoinPackager

public JoinPackager(Packager p,
                    POForEach f)
Method Detail

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