|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.experimental.plan.BaseOperatorPlan
public abstract class BaseOperatorPlan
Field Summary | |
---|---|
protected PlanEdge |
fromEdges
|
protected static org.apache.commons.logging.Log |
log
|
protected Set<Operator> |
ops
|
protected PlanEdge |
toEdges
|
Constructor Summary | |
---|---|
BaseOperatorPlan()
|
Method Summary | |
---|---|
void |
add(Operator op)
Add a new operator to the plan. |
void |
connect(Operator from,
int fromPos,
Operator to,
int toPos)
Connect two operators in the plan, controlling which position in the edge lists that the from and to edges are placed. |
void |
connect(Operator from,
Operator to)
Connect two operators in the plan. |
Pair<Integer,Integer> |
disconnect(Operator from,
Operator to)
Disconnect two operators in the plan. |
void |
explain(PrintStream ps,
String format,
boolean verbose)
|
Iterator<Operator> |
getOperators()
Get an iterator of all operators in this plan |
List<Operator> |
getPredecessors(Operator op)
For a given operator, get all operators immediately before it in the plan. |
List<Operator> |
getSinks()
Get all operators in the plan that have no successors. |
List<Operator> |
getSources()
Get all operators in the plan that have no predecessors. |
List<Operator> |
getSuccessors(Operator op)
For a given operator, get all operators immediately after it. |
boolean |
isEqual(OperatorPlan other)
This is like a shallow comparison. |
protected static boolean |
isEqual(OperatorPlan p1,
OperatorPlan p2)
|
void |
remove(Operator op)
Remove an operator from the plan. |
int |
size()
Get number of nodes in the plan. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Set<Operator> ops
protected PlanEdge fromEdges
protected PlanEdge toEdges
protected static final org.apache.commons.logging.Log log
Constructor Detail |
---|
public BaseOperatorPlan()
Method Detail |
---|
public int size()
size
in interface OperatorPlan
public List<Operator> getSources()
getSources
in interface OperatorPlan
public List<Operator> getSinks()
getSinks
in interface OperatorPlan
public List<Operator> getPredecessors(Operator op) throws IOException
getPredecessors
in interface OperatorPlan
op
- operator to fetch predecessors of
IOException
- if op is not in the plan.public List<Operator> getSuccessors(Operator op) throws IOException
getSuccessors
in interface OperatorPlan
op
- operator to fetch successors of
IOException
- if op is not in the plan.public void add(Operator op)
add
in interface OperatorPlan
op
- operator to addpublic void remove(Operator op) throws IOException
remove
in interface OperatorPlan
op
- Operator to be removed
IOException
- if the remove operation attempts to
remove an operator that is still connected to other operators.public void connect(Operator from, int fromPos, Operator to, int toPos)
connect
in interface OperatorPlan
from
- Operator edge will come fromfromPos
- Position in the array for the from edgeto
- Operator edge will go totoPos
- Position in the array for the to edgepublic void connect(Operator from, Operator to)
connect
in interface OperatorPlan
from
- Operator edge will come fromto
- Operator edge will go topublic Pair<Integer,Integer> disconnect(Operator from, Operator to) throws IOException
disconnect
in interface OperatorPlan
from
- Operator edge is coming fromto
- Operator edge is going to
IOException
- if the two operators aren't connected.public Iterator<Operator> getOperators()
OperatorPlan
getOperators
in interface OperatorPlan
public boolean isEqual(OperatorPlan other)
OperatorPlan
isEqual
in interface OperatorPlan
other
- object to compare
protected static boolean isEqual(OperatorPlan p1, OperatorPlan p2)
public void explain(PrintStream ps, String format, boolean verbose) throws IOException
IOException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |