public class POCounter extends PhysicalOperator
PhysicalOperator.OriginalLocation
Modifier and Type | Field and Description |
---|---|
protected static TupleFactory |
mTupleFactory |
static java.lang.Long |
ONE |
alias, illustrator, input, inputAttached, inputs, lineageTracer, outputs, parentPlan, pigLogger, reporter, requestedParallelism, res, RESULT_EMPTY, RESULT_EOP, resultType
Constructor and Description |
---|
POCounter(OperatorKey k) |
POCounter(OperatorKey k,
int rp) |
POCounter(OperatorKey k,
int rp,
java.util.List<PhysicalOperator> inputs) |
POCounter(OperatorKey operatorKey,
int requestedParallelism,
java.util.List inp,
java.util.List<PhysicalPlan> counterPlans,
java.util.List<java.lang.Boolean> ascendingCol) |
POCounter(OperatorKey k,
java.util.List<PhysicalOperator> inputs) |
POCounter(POCounter copy) |
Modifier and Type | Method and Description |
---|---|
protected Result |
addCounterValue(Result input)
Add current task id and local counter value.
|
protected void |
addToLocalCounter(java.lang.Long sizeBag) |
java.util.List<java.lang.Boolean> |
getAscendingColumns() |
java.util.List<PhysicalPlan> |
getCounterPlans() |
java.lang.Long |
getLocalCounter() |
Result |
getNextTuple() |
java.lang.String |
getOperationID() |
int |
getTaskId() |
Tuple |
illustratorMarkup(java.lang.Object in,
java.lang.Object out,
int eqClassIndex)
input tuple mark up to be illustrate-able
|
protected java.lang.Long |
incrementLocalCounter()
Sequential counter used at ROW NUMBER and RANK BY DENSE mode
|
protected void |
incrementReduceCounter(java.lang.Long increment) |
boolean |
isDenseRank() |
boolean |
isRowNumber() |
java.lang.String |
name() |
void |
resetLocalCounter()
Initialization step into the POCounter is to set
up local counter to 1.
|
void |
setAscendingColumns(java.util.List<java.lang.Boolean> mAscCols) |
void |
setCounterPlans(java.util.List<PhysicalPlan> counterPlans) |
void |
setIsDenseRank(boolean isDenseRank)
Dense Rank flag
|
void |
setIsRowNumber(boolean isRowNumber)
Row number flag
|
void |
setLocalCounter(java.lang.Long localCount) |
void |
setOperationID(java.lang.String operationID)
Operation ID: identifier shared within the corresponding PORank
|
void |
setTaskId(int taskID)
Task ID: identifier of the task (map or reducer)
|
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.
|
addOriginalLocation, addOriginalLocation, attachInput, clone, cloneHelper, copyAliasFrom, 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, staticDataCleanup
compareTo, equals, getOperatorKey, getProjectionMap, hashCode, regenerateProjectionMap, rewire, toString, unsetProjectionMap
public static final java.lang.Long ONE
protected static final TupleFactory mTupleFactory
public POCounter(OperatorKey k)
public POCounter(OperatorKey k, int rp)
public POCounter(OperatorKey k, java.util.List<PhysicalOperator> inputs)
public POCounter(OperatorKey k, int rp, java.util.List<PhysicalOperator> inputs)
public POCounter(POCounter copy)
public POCounter(OperatorKey operatorKey, int requestedParallelism, java.util.List inp, java.util.List<PhysicalPlan> counterPlans, java.util.List<java.lang.Boolean> ascendingCol)
public Tuple illustratorMarkup(java.lang.Object in, java.lang.Object out, int eqClassIndex)
Illustrable
in
- input tupleout
- output tuple before wrapped in ExampleTupleeqClassIndex
- index into equivalence classes in illustratorpublic void visit(PhyPlanVisitor v) throws VisitorException
Operator
visit
in class PhysicalOperator
v
- Visitor to visit with.VisitorException
- if the visitor has a problem.public Result getNextTuple() throws ExecException
getNextTuple
in class PhysicalOperator
ExecException
protected Result addCounterValue(Result input) throws ExecException
input
- from the previous outputExecException
protected void incrementReduceCounter(java.lang.Long increment)
public boolean supportsMultipleInputs()
Operator
supportsMultipleInputs
in class Operator<PhyPlanVisitor>
public boolean supportsMultipleOutputs()
Operator
supportsMultipleOutputs
in class Operator<PhyPlanVisitor>
public java.lang.String name()
name
in class Operator<PhyPlanVisitor>
public void setCounterPlans(java.util.List<PhysicalPlan> counterPlans)
public java.util.List<PhysicalPlan> getCounterPlans()
public void setAscendingColumns(java.util.List<java.lang.Boolean> mAscCols)
public java.util.List<java.lang.Boolean> getAscendingColumns()
public void resetLocalCounter()
protected java.lang.Long incrementLocalCounter()
public void setLocalCounter(java.lang.Long localCount)
public java.lang.Long getLocalCounter()
protected void addToLocalCounter(java.lang.Long sizeBag)
public void setTaskId(int taskID)
public int getTaskId()
public void setIsDenseRank(boolean isDenseRank)
public boolean isDenseRank()
public void setIsRowNumber(boolean isRowNumber)
public boolean isRowNumber()
public void setOperationID(java.lang.String operationID)
public java.lang.String getOperationID()
Copyright © 2007-2012 The Apache Software Foundation