public abstract class PhysicalOperator extends Operator<PhyPlanVisitor> implements Illustrable, Cloneable
| Modifier and Type | Class and Description |
|---|---|
static class |
PhysicalOperator.OriginalLocation |
| Modifier and Type | Field and Description |
|---|---|
protected String |
alias |
protected Illustrator |
illustrator |
protected Tuple |
input |
protected boolean |
inputAttached |
protected List<PhysicalOperator> |
inputs |
protected LineageTracer |
lineageTracer |
protected static BagFactory |
mBagFactory |
protected static TupleFactory |
mTupleFactory |
protected List<PhysicalOperator> |
outputs |
protected PhysicalPlan |
parentPlan |
protected static PigLogger |
pigLogger |
protected static ThreadLocal<PigProgressable> |
reporter |
protected int |
requestedParallelism |
protected Result |
res |
protected static Result |
RESULT_EMPTY |
protected static Result |
RESULT_EOP |
protected byte |
resultType |
protected static long |
serialVersionUID |
| Constructor and Description |
|---|
PhysicalOperator(OperatorKey k) |
PhysicalOperator(OperatorKey k,
int rp) |
PhysicalOperator(OperatorKey k,
int rp,
List<PhysicalOperator> inp) |
PhysicalOperator(OperatorKey k,
List<PhysicalOperator> inp) |
PhysicalOperator(PhysicalOperator copy) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOriginalLocation(String alias,
List<PhysicalOperator.OriginalLocation> originalLocations) |
void |
addOriginalLocation(String alias,
SourceLocation sourceLocation) |
void |
attachInput(Tuple t)
Shorts the input path of this operator by providing the input tuple
directly
|
PhysicalOperator |
clone()
Make a copy of this operator.
|
protected void |
cloneHelper(PhysicalOperator op) |
protected static List<PhysicalPlan> |
clonePlans(List<PhysicalPlan> origPlans) |
void |
copyAliasFrom(PhysicalOperator op) |
void |
detachInput()
Detaches any tuples that are attached
|
String |
getAlias() |
protected String |
getAliasString() |
Illustrator |
getIllustrator() |
List<PhysicalOperator> |
getInputs() |
org.apache.commons.logging.Log |
getLogger() |
Result |
getNext(byte dataType)
Implementations that call into the different versions of getNext are often
identical, differing only in the signature of the getNext() call they make.
|
Result |
getNextBigDecimal() |
Result |
getNextBigInteger() |
Result |
getNextBoolean() |
Result |
getNextDataBag() |
Result |
getNextDataByteArray() |
Result |
getNextDateTime() |
Result |
getNextDouble() |
Result |
getNextFloat() |
Result |
getNextInteger() |
Result |
getNextLong() |
Result |
getNextMap() |
Result |
getNextString() |
Result |
getNextTuple() |
List<PhysicalOperator.OriginalLocation> |
getOriginalLocations() |
PhysicalPlan |
getParentPlan() |
static PigLogger |
getPigLogger() |
static PigProgressable |
getReporter() |
int |
getRequestedParallelism() |
byte |
getResultType() |
boolean |
isAccumStarted() |
boolean |
isAccumulative() |
boolean |
isBlocking()
A blocking operator should override this to return true.
|
boolean |
isEndOfAllInput() |
boolean |
isInputAttached() |
Result |
processInput()
A generic method for parsing input that either returns the attached input
if it exists or fetches it from its predecessor.
|
void |
reset()
Reset internal state in an operator.
|
void |
setAccumEnd() |
void |
setAccumStart() |
void |
setAccumulative() |
void |
setIllustrator(Illustrator illustrator) |
void |
setInputs(List<PhysicalOperator> inputs) |
void |
setParentPlan(PhysicalPlan physicalPlan) |
static void |
setPigLogger(PigLogger logger) |
static void |
setReporter(PigProgressable reporter) |
void |
setRequestedParallelism(int requestedParallelism) |
void |
setResultType(byte resultType) |
static void |
staticDataCleanup() |
abstract void |
visit(PhyPlanVisitor v)
Visit this node with the provided visitor.
|
compareTo, equals, getOperatorKey, getProjectionMap, hashCode, name, regenerateProjectionMap, rewire, supportsMultipleInputs, supportsMultipleOutputs, toString, unsetProjectionMapfinalize, getClass, notify, notifyAll, wait, wait, waitillustratorMarkupprotected static final long serialVersionUID
protected static final Result RESULT_EMPTY
protected static final Result RESULT_EOP
protected static final TupleFactory mTupleFactory
protected static final BagFactory mBagFactory
protected int requestedParallelism
protected List<PhysicalOperator> inputs
protected List<PhysicalOperator> outputs
protected byte resultType
protected PhysicalPlan parentPlan
protected boolean inputAttached
protected Tuple input
protected Result res
protected String alias
protected static ThreadLocal<PigProgressable> reporter
protected static PigLogger pigLogger
protected LineageTracer lineageTracer
protected transient Illustrator illustrator
public PhysicalOperator(OperatorKey k)
public PhysicalOperator(OperatorKey k, int rp)
public PhysicalOperator(OperatorKey k, List<PhysicalOperator> inp)
public PhysicalOperator(OperatorKey k, int rp, List<PhysicalOperator> inp)
public PhysicalOperator(PhysicalOperator copy)
public void setIllustrator(Illustrator illustrator)
setIllustrator in interface Illustrablepublic Illustrator getIllustrator()
public int getRequestedParallelism()
public void setRequestedParallelism(int requestedParallelism)
public byte getResultType()
public String getAlias()
protected String getAliasString()
public void copyAliasFrom(PhysicalOperator op)
public void addOriginalLocation(String alias, SourceLocation sourceLocation)
public void addOriginalLocation(String alias, List<PhysicalOperator.OriginalLocation> originalLocations)
public List<PhysicalOperator.OriginalLocation> getOriginalLocations()
public void setAccumulative()
public boolean isAccumulative()
public void setAccumStart()
public boolean isAccumStarted()
public void setAccumEnd()
public void setResultType(byte resultType)
public List<PhysicalOperator> getInputs()
public void setInputs(List<PhysicalOperator> inputs)
public boolean isInputAttached()
public void attachInput(Tuple t)
t - -
The tuple that should be used as inputpublic void detachInput()
public boolean isBlocking()
public Result processInput() throws ExecException
ExecExceptionpublic abstract void visit(PhyPlanVisitor v) throws VisitorException
Operatorvisit in class Operator<PhyPlanVisitor>v - Visitor to visit with.VisitorException - if the visitor has a problem.public Result getNext(byte dataType) throws ExecException
dataType - Describes the type of obj; a byte from DataType.ExecExceptionpublic Result getNextInteger() throws ExecException
ExecExceptionpublic Result getNextLong() throws ExecException
ExecExceptionpublic Result getNextDouble() throws ExecException
ExecExceptionpublic Result getNextFloat() throws ExecException
ExecExceptionpublic Result getNextDateTime() throws ExecException
ExecExceptionpublic Result getNextString() throws ExecException
ExecExceptionpublic Result getNextDataByteArray() throws ExecException
ExecExceptionpublic Result getNextMap() throws ExecException
ExecExceptionpublic Result getNextBoolean() throws ExecException
ExecExceptionpublic Result getNextTuple() throws ExecException
ExecExceptionpublic Result getNextDataBag() throws ExecException
ExecExceptionpublic Result getNextBigInteger() throws ExecException
ExecExceptionpublic Result getNextBigDecimal() throws ExecException
ExecExceptionpublic void reset()
public boolean isEndOfAllInput()
public static PigProgressable getReporter()
public static void setReporter(PigProgressable reporter)
reporter - PigProgressable to be stored in threadlocalpublic static void staticDataCleanup()
public PhysicalOperator clone() throws CloneNotSupportedException
protected void cloneHelper(PhysicalOperator op)
protected static List<PhysicalPlan> clonePlans(List<PhysicalPlan> origPlans) throws CloneNotSupportedException
CloneNotSupportedExceptionpublic void setParentPlan(PhysicalPlan physicalPlan)
physicalPlan - public PhysicalPlan getParentPlan()
public org.apache.commons.logging.Log getLogger()
public static void setPigLogger(PigLogger logger)
public static PigLogger getPigLogger()
Copyright © 2007-2017 The Apache Software Foundation