|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.impl.plan.Operator<V>
public abstract class Operator<V extends PlanVisitor>
Base class for all types of operators.
Field Summary | |
---|---|
protected OperatorKey |
mKey
OperatorKey associated with this operator. |
Constructor Summary | |
---|---|
Operator(OperatorKey k)
|
Method Summary | |
---|---|
protected Object |
clone()
|
int |
compareTo(Operator o)
|
boolean |
equals(Object obj)
Compares to Operators based on their opKey |
OperatorKey |
getOperatorKey()
Get the operator key for this operator. |
ProjectionMap |
getProjectionMap()
Produce a map describing how this operator modifies its projection. |
int |
hashCode()
Needed to ensure that the list iterators' outputs are deterministic. |
abstract String |
name()
|
ProjectionMap |
regenerateProjectionMap()
Regenerate the projection map by unsetting and getting the projection map |
void |
rewire(Operator<V> oldPred,
int oldPredIndex,
Operator<V> newPred,
boolean useOldPred)
Make any necessary changes to a node based on a change of position in the plan. |
abstract boolean |
supportsMultipleInputs()
Indicates whether this operator supports multiple inputs. |
abstract boolean |
supportsMultipleOutputs()
Indicates whether this operator supports multiple outputs. |
String |
toString()
|
void |
unsetProjectionMap()
Unset the projection map as if it had not been calculated. |
abstract void |
visit(V v)
Visit this node with the provided visitor. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected OperatorKey mKey
Constructor Detail |
---|
public Operator(OperatorKey k)
k
- Operator key to assign to this node.Method Detail |
---|
public OperatorKey getOperatorKey()
public abstract void visit(V v) throws VisitorException
v
- Visitor to visit with.
VisitorException
- if the visitor has a problem.public abstract boolean supportsMultipleInputs()
public abstract boolean supportsMultipleOutputs()
public abstract String name()
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(Operator o)
compareTo
in interface Comparable<Operator>
protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Do not use the clone method directly. Operators are cloned when logical plans
are cloned using {@link LogicalPlanCloner}
public ProjectionMap getProjectionMap()
public void unsetProjectionMap()
public ProjectionMap regenerateProjectionMap()
public void rewire(Operator<V> oldPred, int oldPredIndex, Operator<V> newPred, boolean useOldPred) throws PlanException
oldPred
- Operator that was previously the predecessor.oldPredIndex
- position of the old predecessor in the list of predecessorsnewPred
- Operator that will now be the predecessor.useOldPred
- If true use oldPred's projection map for the rewire; otherwise
use newPred's projection map
PlanException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |