|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pig.impl.plan.Operator<PhyPlanVisitor>
org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POLocalRearrange
public class POLocalRearrange
The local rearrange operator is a part of the co-group implementation. It has an embedded physical plan that generates tuples of the form (grpKey,(indxed inp Tuple)).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
|---|
PhysicalOperator.OriginalLocation |
| Field Summary | |
|---|---|
protected byte |
index
|
protected boolean |
isCross
|
protected byte |
keyType
|
protected List<ExpressionOperator> |
leafOps
|
protected byte |
mainKeyType
|
protected Tuple |
mFakeTuple
|
protected boolean |
mIsDistinct
|
protected static TupleFactory |
mTupleFactory
|
protected List<PhysicalPlan> |
plans
|
protected byte |
secondaryKeyType
|
protected List<ExpressionOperator> |
secondaryLeafOps
|
protected List<PhysicalPlan> |
secondaryPlans
|
protected static long |
serialVersionUID
|
| Fields inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
|---|
alias, illustrator, input, inputAttached, inputs, lineageTracer, outputs, parentPlan, pigLogger, requestedParallelism, res, resultType |
| Fields inherited from class org.apache.pig.impl.plan.Operator |
|---|
mKey |
| Constructor Summary | |
|---|---|
POLocalRearrange(OperatorKey k)
|
|
POLocalRearrange(OperatorKey k,
int rp)
|
|
POLocalRearrange(OperatorKey k,
int rp,
List<PhysicalOperator> inp)
|
|
POLocalRearrange(OperatorKey k,
List<PhysicalOperator> inp)
|
|
| Method Summary | |
|---|---|
void |
attachInput(Tuple t)
Overridden since the attachment of the new input should cause the old processing to end. |
POLocalRearrange |
clone()
Make a deep copy of this operator. |
protected Tuple |
constructLROutput(List<Result> resLst,
List<Result> secondaryResLst,
Tuple value)
|
byte |
getIndex()
|
protected Object |
getKeyFromResult(List<Result> resLst,
byte type)
|
byte |
getKeyType()
|
Result |
getNextTuple()
Calls getNext on the generate operator inside the nested physical plan. |
List<PhysicalPlan> |
getPlans()
|
Map<Integer,Integer> |
getProjectedColsMap()
|
Map<Integer,Integer> |
getSecondaryProjectedColsMap()
|
Tuple |
illustratorMarkup(Object in,
Object out,
int eqClassIndex)
input tuple mark up to be illustrate-able |
boolean |
isCross()
|
boolean |
isDistinct()
|
boolean |
isKeyCompound()
|
boolean |
isKeyTuple()
|
boolean |
isProjectStar()
|
boolean |
isSecondaryKeyTuple()
|
boolean |
isSecondaryProjectStar()
|
String |
name()
|
void |
setCross(boolean isCross)
|
void |
setDistinct(boolean isDistinct)
|
void |
setIndex(int index)
Sets the co-group index of this operator |
void |
setKeyType(byte keyType)
|
void |
setMultiQueryIndex(int index)
Sets the multi-query index of this operator |
void |
setPlans(List<PhysicalPlan> plans)
|
void |
setPlansFromCombiner(List<PhysicalPlan> plans)
|
void |
setSecondaryPlans(List<PhysicalPlan> plans)
|
protected void |
setStripKeyFromValue(boolean stripKeyFromValue)
|
void |
setUseSecondaryKey(boolean useSecondaryKey)
|
boolean |
supportsMultipleInputs()
Indicates whether this operator supports multiple inputs. |
boolean |
supportsMultipleOutputs()
Indicates whether this operator supports multiple outputs. |
void |
visit(PhyPlanVisitor v)
Visit this node with the provided visitor. |
| Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
|---|
addOriginalLocation, addOriginalLocation, cloneHelper, detachInput, getAlias, getAliasString, getIllustrator, getInputs, getLogger, getNext, getNextBigDecimal, getNextBigInteger, getNextBoolean, getNextDataBag, getNextDataByteArray, getNextDateTime, getNextDouble, getNextFloat, getNextInteger, getNextLong, getNextMap, getNextString, getOriginalLocations, getPigLogger, getReporter, getRequestedParallelism, getResultType, isAccumStarted, isAccumulative, isBlocking, isInputAttached, processInput, reset, setAccumEnd, setAccumStart, setAccumulative, 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 |
|---|
protected static final long serialVersionUID
protected static final TupleFactory mTupleFactory
protected List<PhysicalPlan> plans
protected List<PhysicalPlan> secondaryPlans
protected List<ExpressionOperator> leafOps
protected List<ExpressionOperator> secondaryLeafOps
protected byte index
protected byte keyType
protected byte mainKeyType
protected byte secondaryKeyType
protected boolean mIsDistinct
protected boolean isCross
protected Tuple mFakeTuple
| Constructor Detail |
|---|
public POLocalRearrange(OperatorKey k)
public POLocalRearrange(OperatorKey k,
int rp)
public POLocalRearrange(OperatorKey k,
List<PhysicalOperator> inp)
public POLocalRearrange(OperatorKey k,
int rp,
List<PhysicalOperator> inp)
| Method Detail |
|---|
public void visit(PhyPlanVisitor v)
throws VisitorException
Operator
visit in class PhysicalOperatorv - Visitor to visit with.
VisitorException - if the visitor has a problem.public String name()
name in class Operator<PhyPlanVisitor>public boolean supportsMultipleInputs()
Operator
supportsMultipleInputs in class Operator<PhyPlanVisitor>public boolean supportsMultipleOutputs()
Operator
supportsMultipleOutputs in class Operator<PhyPlanVisitor>public byte getIndex()
public void setIndex(int index)
throws ExecException
index - the position of this operator in
a co-group operation
ExecException - if the index value is bigger then 0x7F
public void setMultiQueryIndex(int index)
throws ExecException
index - the position of the parent plan of this operator
in the enclosed split operator
ExecException - if the index value is bigger then 0x7Fpublic boolean isDistinct()
public void setDistinct(boolean isDistinct)
public void attachInput(Tuple t)
attachInput in class PhysicalOperatort - -
The tuple that should be used as input
public Result getNextTuple()
throws ExecException
getNextTuple in class PhysicalOperatorExecException
protected Object getKeyFromResult(List<Result> resLst,
byte type)
throws ExecException
ExecException
protected Tuple constructLROutput(List<Result> resLst,
List<Result> secondaryResLst,
Tuple value)
throws ExecException
ExecExceptionpublic byte getKeyType()
public void setKeyType(byte keyType)
public List<PhysicalPlan> getPlans()
public void setUseSecondaryKey(boolean useSecondaryKey)
public void setPlans(List<PhysicalPlan> plans)
throws PlanException
PlanException
public void setSecondaryPlans(List<PhysicalPlan> plans)
throws PlanException
PlanException
public POLocalRearrange clone()
throws CloneNotSupportedException
clone in class PhysicalOperatorCloneNotSupportedExceptionDo not use the clone method directly. Operators are cloned when logical plans
are cloned using {@link LogicalPlanCloner}public boolean isCross()
public void setCross(boolean isCross)
public Map<Integer,Integer> getProjectedColsMap()
public Map<Integer,Integer> getSecondaryProjectedColsMap()
public boolean isProjectStar()
public boolean isSecondaryProjectStar()
public boolean isKeyTuple()
public boolean isKeyCompound()
public boolean isSecondaryKeyTuple()
public void setPlansFromCombiner(List<PhysicalPlan> plans)
throws PlanException
plans -
ExecException
PlanExceptionprotected void setStripKeyFromValue(boolean stripKeyFromValue)
public Tuple illustratorMarkup(Object in,
Object out,
int eqClassIndex)
Illustrable
in - input tupleout - output tuple before wrapped in ExampleTupleeqClassIndex - index into equivalence classes in illustrator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||