public class POCounter extends PhysicalOperator
PhysicalOperator.OriginalLocation| Modifier and Type | Field and Description |
|---|---|
static Long |
ONE |
alias, illustrator, input, inputAttached, inputs, lineageTracer, mBagFactory, mTupleFactory, 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,
List<PhysicalOperator> inputs) |
POCounter(OperatorKey operatorKey,
int requestedParallelism,
List inp,
List<PhysicalPlan> counterPlans,
List<Boolean> ascendingCol) |
POCounter(OperatorKey k,
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(Long sizeBag) |
POCounter |
clone()
Make a copy of this operator.
|
List<Boolean> |
getAscendingColumns() |
List<PhysicalPlan> |
getCounterPlans() |
Long |
getLocalCounter() |
Result |
getNextTuple() |
String |
getOperationID() |
int |
getTaskId() |
Tuple |
illustratorMarkup(Object in,
Object out,
int eqClassIndex)
input tuple mark up to be illustrate-able
|
protected Long |
incrementLocalCounter()
Sequential counter used at ROW NUMBER and RANK BY DENSE mode
|
protected void |
incrementReduceCounter(Long increment) |
boolean |
isDenseRank() |
boolean |
isRowNumber() |
String |
name() |
void |
resetLocalCounter()
Initialization step into the POCounter is to set
up local counter to 1.
|
void |
setAscendingColumns(List<Boolean> mAscCols) |
void |
setCounterPlans(List<PhysicalPlan> counterPlans) |
void |
setIsDenseRank(boolean isDenseRank)
Dense Rank flag
|
void |
setIsRowNumber(boolean isRowNumber)
Row number flag
|
void |
setLocalCounter(Long localCount) |
void |
setOperationID(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, cloneHelper, clonePlans, copyAliasFrom, detachInput, getAlias, getAliasString, getIllustrator, getInputs, getLogger, getNext, getNextBigDecimal, getNextBigInteger, getNextBoolean, getNextDataBag, getNextDataByteArray, getNextDateTime, getNextDouble, getNextFloat, getNextInteger, getNextLong, getNextMap, getNextString, getOriginalLocations, getParentPlan, getPigLogger, getReporter, getRequestedParallelism, getResultType, isAccumStarted, isAccumulative, isBlocking, isEndOfAllInput, isInputAttached, processInput, reset, setAccumEnd, setAccumStart, setAccumulative, setIllustrator, setInputs, setParentPlan, setPigLogger, setReporter, setRequestedParallelism, setResultType, staticDataCleanupcompareTo, equals, getOperatorKey, getProjectionMap, hashCode, regenerateProjectionMap, rewire, toString, unsetProjectionMappublic static final Long ONE
public POCounter(OperatorKey k)
public POCounter(OperatorKey k, int rp)
public POCounter(OperatorKey k, List<PhysicalOperator> inputs)
public POCounter(OperatorKey k, int rp, List<PhysicalOperator> inputs)
public POCounter(POCounter copy)
public POCounter(OperatorKey operatorKey, int requestedParallelism, List inp, List<PhysicalPlan> counterPlans, List<Boolean> ascendingCol)
public Tuple illustratorMarkup(Object in, Object out, int eqClassIndex)
Illustrablein - input tupleout - output tuple before wrapped in ExampleTupleeqClassIndex - index into equivalence classes in illustratorpublic void visit(PhyPlanVisitor v) throws VisitorException
Operatorvisit in class PhysicalOperatorv - Visitor to visit with.VisitorException - if the visitor has a problem.public Result getNextTuple() throws ExecException
getNextTuple in class PhysicalOperatorExecExceptionprotected Result addCounterValue(Result input) throws ExecException
input - from the previous outputExecExceptionprotected void incrementReduceCounter(Long increment)
public boolean supportsMultipleInputs()
OperatorsupportsMultipleInputs in class Operator<PhyPlanVisitor>public boolean supportsMultipleOutputs()
OperatorsupportsMultipleOutputs in class Operator<PhyPlanVisitor>public String name()
name in class Operator<PhyPlanVisitor>public void setCounterPlans(List<PhysicalPlan> counterPlans)
public List<PhysicalPlan> getCounterPlans()
public void resetLocalCounter()
protected Long incrementLocalCounter()
public void setLocalCounter(Long localCount)
public Long getLocalCounter()
protected void addToLocalCounter(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(String operationID)
public String getOperationID()
public POCounter clone() throws CloneNotSupportedException
PhysicalOperatorCopyright © 2007-2017 The Apache Software Foundation