org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators
Class POForEach
java.lang.Object
org.apache.pig.impl.plan.Operator<PhyPlanVisitor>
org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach
- All Implemented Interfaces:
- Serializable, Cloneable, Comparable<Operator>, Illustrable
- Direct Known Subclasses:
- POOptimizedForEach
public class POForEach
- extends PhysicalOperator
- See Also:
- Serialized Form
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
alias, dummyBag, dummyBool, dummyDateTime, dummyDBA, dummyDouble, dummyFloat, dummyInt, dummyLong, dummyMap, dummyString, dummyTuple, illustrator, input, inputAttached, inputs, lineageTracer, outputs, parentPlan, pigLogger, reporter, requestedParallelism, res, resultType |
Fields inherited from class org.apache.pig.impl.plan.Operator |
mKey |
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
addOriginalLocation, addOriginalLocation, attachInput, cloneHelper, detachInput, getAlias, getAliasString, getDummy, getIllustrator, getInputs, getLogger, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getOriginalLocations, getPigLogger, getRequestedParallelism, getResultType, isAccumStarted, isAccumulative, isBlocking, isInputAttached, processInput, reset, setIllustrator, setInputs, setParentPlan, setPigLogger, setReporter, setRequestedParallelism, setResultType |
inputPlans
protected List<PhysicalPlan> inputPlans
opsToBeReset
protected List<PhysicalOperator> opsToBeReset
processingPlan
protected boolean processingPlan
its
protected transient Iterator<Tuple>[] its
bags
protected Object[] bags
data
protected Object[] data
resultTypes
protected byte[] resultTypes
earlyTermination
protected BitSet earlyTermination
isToBeFlattenedArray
protected boolean[] isToBeFlattenedArray
noItems
protected int noItems
planLeafOps
protected PhysicalOperator[] planLeafOps
buffer
protected transient AccumulativeTupleBuffer buffer
inpTuple
protected Tuple inpTuple
POForEach
public POForEach(OperatorKey k)
POForEach
public POForEach(OperatorKey k,
int rp)
POForEach
public POForEach(OperatorKey k,
List inp)
POForEach
public POForEach(OperatorKey k,
int rp,
List<PhysicalPlan> inp,
List<Boolean> isToBeFlattened)
POForEach
public POForEach(OperatorKey operatorKey,
int requestedParallelism,
List<PhysicalPlan> innerPlans,
List<Boolean> flattenList,
Schema schema)
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.
- Specified by:
visit
in class PhysicalOperator
- Parameters:
v
- Visitor to visit with.
- Throws:
VisitorException
- if the visitor has a problem.
name
public String name()
- Specified by:
name
in class Operator<PhyPlanVisitor>
supportsMultipleInputs
public boolean supportsMultipleInputs()
- Description copied from class:
Operator
- Indicates whether this operator supports multiple inputs.
- Specified by:
supportsMultipleInputs
in class Operator<PhyPlanVisitor>
- Returns:
- true if it does, otherwise false.
supportsMultipleOutputs
public boolean supportsMultipleOutputs()
- Description copied from class:
Operator
- Indicates whether this operator supports multiple outputs.
- Specified by:
supportsMultipleOutputs
in class Operator<PhyPlanVisitor>
- Returns:
- true if it does, otherwise false.
setAccumulative
public void setAccumulative()
- Overrides:
setAccumulative
in class PhysicalOperator
setAccumStart
public void setAccumStart()
- Overrides:
setAccumStart
in class PhysicalOperator
setAccumEnd
public void setAccumEnd()
- Overrides:
setAccumEnd
in class PhysicalOperator
getNext
public Result getNext(Tuple t)
throws ExecException
- Calls getNext on the generate operator inside the nested
physical plan and returns it maintaining an additional state
to denote the begin and end of the nested plan processing.
- Overrides:
getNext
in class PhysicalOperator
- Throws:
ExecException
processPlan
protected Result processPlan()
throws ExecException
- Throws:
ExecException
createTuple
protected Tuple createTuple(Object[] data)
throws ExecException
- Parameters:
data
- array that is the template for the final flattened tuple
- Returns:
- the final flattened tuple
- Throws:
ExecException
attachInputToPlans
protected void attachInputToPlans(Tuple t)
getLeaves
public void getLeaves()
getInputPlans
public List<PhysicalPlan> getInputPlans()
setInputPlans
public void setInputPlans(List<PhysicalPlan> plans)
addInputPlan
public void addInputPlan(PhysicalPlan plan,
boolean flatten)
setToBeFlattened
public void setToBeFlattened(List<Boolean> flattens)
getToBeFlattened
public List<Boolean> getToBeFlattened()
clone
public POForEach clone()
throws CloneNotSupportedException
- Make a deep copy of this operator.
- Overrides:
clone
in class PhysicalOperator
- Throws:
CloneNotSupportedException
- See Also:
Do not use the clone method directly. Operators are cloned when logical plans
are cloned using {@link LogicalPlanCloner}
inProcessing
public boolean inProcessing()
setUpFlattens
protected void setUpFlattens(List<Boolean> isToBeFlattened)
getOpsToBeReset
public List<PhysicalOperator> getOpsToBeReset()
- Returns:
- the opsToBeReset
setOpsToBeReset
public void setOpsToBeReset(List<PhysicalOperator> opsToBeReset)
- Parameters:
opsToBeReset
- the opsToBeReset to set
illustratorMarkup
public Tuple illustratorMarkup(Object in,
Object out,
int eqClassIndex)
- Description copied from interface:
Illustrable
- input tuple mark up to be illustrate-able
- Parameters:
in
- input tupleout
- output tuple before wrapped in ExampleTupleeqClassIndex
- index into equivalence classes in illustrator
- Returns:
- tuple
Copyright © 2007-2012 The Apache Software Foundation