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

java.lang.Object
  extended by org.apache.pig.impl.plan.Operator<PhyPlanVisitor>
      extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
          extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POPackage
              extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POJoinPackage
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Operator>, Illustrable

public class POJoinPackage
extends POPackage

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POPackage
POPackage.PackageType
 
Field Summary
static String DEFAULT_CHUNK_SIZE
           
 
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POPackage
distinct, isKeyTuple, keyAsTuple, keyInfo, mBagFactory, mTupleFactory
 
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
alias, dummyBag, dummyBool, dummyDBA, dummyDouble, dummyFloat, dummyInt, dummyLong, dummyMap, dummyString, dummyTuple, illustrator, input, inputAttached, inputs, lineageTracer, outputs, parentPlan, pigLogger, reporter, requestedParallelism, resultType
 
Fields inherited from class org.apache.pig.impl.plan.Operator
mKey
 
Constructor Summary
POJoinPackage(OperatorKey k, int rp, POPackage p, POForEach f)
           
 
Method Summary
 POOptimizedForEach getForEach()
           
 List<PhysicalPlan> getInputPlans()
           
 Result getNext(Tuple t)
          Calls getNext to get next ForEach result.
 String name()
           
 void setChunkSize(long chunkSize)
           
 void setInputPlans(List<PhysicalPlan> plans)
           
 void setToBeFlattened(List<Boolean> flattens)
           
 void visit(PhyPlanVisitor v)
          Visit this node with the provided visitor.
 
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POPackage
attachInput, clone, detachInput, getInner, getKeyInfo, getKeyType, getNumInps, getPackageType, getValueTuple, illustratorMarkup, isDistinct, setDistinct, setInner, setKeyInfo, setKeyTuple, setKeyType, setNumInps, setPackageType, setUseSecondaryKey, supportsMultipleInputs, supportsMultipleOutputs
 
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
attachInput, cloneHelper, getAlias, getAliasString, getDummy, getIllustrator, getInputs, getLogger, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getPigLogger, getRequestedParallelism, getResultType, isAccumStarted, isAccumulative, isBlocking, isInputAttached, processInput, reset, setAccumEnd, setAccumStart, setAccumulative, setAlias, 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
 

Field Detail

DEFAULT_CHUNK_SIZE

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

POJoinPackage

public POJoinPackage(OperatorKey k,
                     int rp,
                     POPackage p,
                     POForEach f)
Method Detail

visit

public void visit(PhyPlanVisitor v)
           throws VisitorException
Description copied from class: Operator
Visit this node with the provided visitor. This should only be called by the visitor class itself, never directly.

Overrides:
visit in class POPackage
Parameters:
v - Visitor to visit with.
Throws:
VisitorException - if the visitor has a problem.

name

public String name()
Overrides:
name in class POPackage

getNext

public Result getNext(Tuple t)
               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 POPackage
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


Copyright © 2007-2012 The Apache Software Foundation