|
||||||||||
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.POSort
public class POSort
This implementation is applicable for both the physical plan and for the local backend, as the conversion of physical to mapreduce would see the SORT operator and take necessary steps to convert it to a quantile and a sort job. This is a blocking operator. The sortedDataBag accumulates Tuples and sorts them only when there an iterator is started. So all the tuples from the input operator should be accumulated and filled into the dataBag. The attachInput method is not applicable here.
Nested Class Summary | |
---|---|
class |
POSort.SortComparator
|
class |
POSort.UDFSortComparator
|
Field Summary | |
---|---|
boolean |
isUDFComparatorUsed
|
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, res, resultType |
Fields inherited from class org.apache.pig.impl.plan.Operator |
---|
mKey |
Constructor Summary | |
---|---|
POSort(OperatorKey k)
|
|
POSort(OperatorKey k,
int rp)
|
|
POSort(OperatorKey k,
int rp,
List inp)
|
|
POSort(OperatorKey k,
int rp,
List inp,
List<PhysicalPlan> sortPlans,
List<Boolean> mAscCols,
POUserComparisonFunc mSortFunc)
|
|
POSort(OperatorKey k,
List inp)
|
Method Summary | |
---|---|
POSort |
clone()
Make a deep copy of this operator. |
long |
getLimit()
|
List<Boolean> |
getMAscCols()
|
POUserComparisonFunc |
getMSortFunc()
|
Result |
getNext(Tuple t)
|
List<PhysicalPlan> |
getSortPlans()
|
Tuple |
illustratorMarkup(Object in,
Object out,
int eqClassIndex)
input tuple mark up to be illustrate-able |
boolean |
isBlocking()
A blocking operator should override this to return true. |
boolean |
isLimited()
|
String |
name()
|
void |
reset()
Reset internal state in an operator. |
void |
setLimit(long l)
|
void |
setMSortFunc(POUserComparisonFunc sortFunc)
|
void |
setSortPlans(List<PhysicalPlan> sortPlans)
|
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 |
---|
attachInput, cloneHelper, detachInput, getAlias, getAliasString, getDummy, getIllustrator, getInputs, getLogger, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getPigLogger, getRequestedParallelism, getResultType, isAccumStarted, isAccumulative, isInputAttached, processInput, 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 |
---|
public boolean isUDFComparatorUsed
Constructor Detail |
---|
public POSort(OperatorKey k, int rp, List inp, List<PhysicalPlan> sortPlans, List<Boolean> mAscCols, POUserComparisonFunc mSortFunc)
public POSort(OperatorKey k, int rp, List inp)
public POSort(OperatorKey k, int rp)
public POSort(OperatorKey k, List inp)
public POSort(OperatorKey k)
Method Detail |
---|
public String name()
name
in class Operator<PhyPlanVisitor>
public boolean isBlocking()
PhysicalOperator
isBlocking
in class PhysicalOperator
public Result getNext(Tuple t) throws ExecException
getNext
in class PhysicalOperator
ExecException
public boolean supportsMultipleInputs()
Operator
supportsMultipleInputs
in class Operator<PhyPlanVisitor>
public boolean supportsMultipleOutputs()
Operator
supportsMultipleOutputs
in class Operator<PhyPlanVisitor>
public void visit(PhyPlanVisitor v) throws VisitorException
Operator
visit
in class PhysicalOperator
v
- Visitor to visit with.
VisitorException
- if the visitor has a problem.public void reset()
PhysicalOperator
reset
in class PhysicalOperator
public List<PhysicalPlan> getSortPlans()
public void setSortPlans(List<PhysicalPlan> sortPlans)
public POUserComparisonFunc getMSortFunc()
public void setMSortFunc(POUserComparisonFunc sortFunc)
public List<Boolean> getMAscCols()
public void setLimit(long l)
public long getLimit()
public boolean isLimited()
public POSort clone() throws CloneNotSupportedException
PhysicalOperator
clone
in class PhysicalOperator
CloneNotSupportedException
Do not use the clone method directly. Operators are cloned when logical plans
are cloned using {@link LogicalPlanCloner}
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 |