org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans
Class PhysicalPlan

java.lang.Object
  extended by org.apache.pig.impl.plan.OperatorPlan<PhysicalOperator>
      extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans.PhysicalPlan
All Implemented Interfaces:
Serializable, Cloneable, Iterable<PhysicalOperator>

public class PhysicalPlan
extends OperatorPlan<PhysicalOperator>
implements Cloneable

The base class for all types of physical plans. This extends the Operator Plan.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pig.impl.plan.OperatorPlan
OperatorPlan.IndexHelper<E>
 
Field Summary
 boolean endOfAllInput
           
 
Fields inherited from class org.apache.pig.impl.plan.OperatorPlan
log, mFromEdges, mKeys, mOps, mSoftFromEdges, mSoftToEdges, mToEdges
 
Constructor Summary
PhysicalPlan()
           
 
Method Summary
 void attachInput(Tuple t)
           
 PhysicalPlan clone()
           
 void connect(PhysicalOperator from, PhysicalOperator to)
          Create an edge between two nodes.
 void detachInput()
           
 void explain(OutputStream out)
          Write a visual representation of the Physical Plan into the given output stream
 void explain(OutputStream out, boolean verbose)
          Write a visual representation of the Physical Plan into the given output stream
 void explain(PrintStream ps, String format, boolean verbose)
          Write a visual representation of the Physical Plan into the given printstream
 boolean isEmpty()
           
 void remove(PhysicalOperator op)
          Remove an operator from the plan.
 void replace(PhysicalOperator oldNode, PhysicalOperator newNode)
          Replace an existing node in the graph with a new node.
 void resetOpMap()
           
 void setOpMap(MultiMap<PhysicalOperator,PhysicalOperator> opmap)
           
 String toString()
           
 
Methods inherited from class org.apache.pig.impl.plan.OperatorPlan
add, addAsLeaf, createSoftLink, disconnect, doInsertBetween, dump, getKeys, getLeaves, getOperator, getOperatorKey, getPredecessors, getRoots, getSoftLinkPredecessors, getSoftLinkSuccessors, getSuccessors, insertBetween, isSingleLeafPlan, iterator, merge, mergeSharedPlan, pathExists, pushAfter, pushBefore, removeAndReconnect, removeAndReconnectMultiSucc, removeSoftLink, size, swap, trimAbove, trimBelow
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

endOfAllInput

public boolean endOfAllInput
Constructor Detail

PhysicalPlan

public PhysicalPlan()
Method Detail

attachInput

public void attachInput(Tuple t)

detachInput

public void detachInput()

explain

public void explain(OutputStream out)
Write a visual representation of the Physical Plan into the given output stream

Parameters:
out - : OutputStream to which the visual representation is written

explain

public void explain(OutputStream out,
                    boolean verbose)
Write a visual representation of the Physical Plan into the given output stream

Parameters:
out - : OutputStream to which the visual representation is written
verbose - : Amount of information to print

explain

public void explain(PrintStream ps,
                    String format,
                    boolean verbose)
Write a visual representation of the Physical Plan into the given printstream

Parameters:
ps - : PrintStream to which the visual representation is written
format - : Format to print in
verbose - : Amount of information to print

connect

public void connect(PhysicalOperator from,
                    PhysicalOperator to)
             throws PlanException
Description copied from class: OperatorPlan
Create an edge between two nodes. The direction of the edge implies data flow.

Overrides:
connect in class OperatorPlan<PhysicalOperator>
Parameters:
from - Operator data will flow from.
to - Operator data will flow to.
Throws:
PlanException - if this edge will create multiple inputs for an operator that does not support multiple inputs or create multiple outputs for an operator that does not support multiple outputs.

remove

public void remove(PhysicalOperator op)
Description copied from class: OperatorPlan
Remove an operator from the plan. Any edges that the node has will be removed as well.

Overrides:
remove in class OperatorPlan<PhysicalOperator>
Parameters:
op - Operator to remove.

replace

public void replace(PhysicalOperator oldNode,
                    PhysicalOperator newNode)
             throws PlanException
Description copied from class: OperatorPlan
Replace an existing node in the graph with a new node. The new node will be connected to all the nodes the old node was. The old node will be removed. The new node is assumed to have no incoming or outgoing edges

Overrides:
replace in class OperatorPlan<PhysicalOperator>
Parameters:
oldNode - Node to be replaced
newNode - Node to add in place of oldNode
Throws:
PlanException

isEmpty

public boolean isEmpty()

toString

public String toString()
Overrides:
toString in class Object

clone

public PhysicalPlan clone()
                   throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

setOpMap

public void setOpMap(MultiMap<PhysicalOperator,PhysicalOperator> opmap)

resetOpMap

public void resetOpMap()


Copyright © ${year} The Apache Software Foundation