|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pig.impl.plan.PlanDumper<E,P,S>
org.apache.pig.impl.plan.DotPlanDumper<E,P,N,S>
public class DotPlanDumper<E extends Operator,P extends OperatorPlan<E>,N extends Operator,S extends OperatorPlan<N>>
This class puts everything that is needed to dump a plan in a format readable by graphviz's dot algorithm. Out of the box it does not print any nested plans.
| Field Summary | |
|---|---|
protected Set<Operator> |
mMultiInputSubgraphs
|
protected Set<Operator> |
mMultiOutputSubgraphs
|
protected Set<Operator> |
mSubgraphs
|
| Fields inherited from class org.apache.pig.impl.plan.PlanDumper |
|---|
isVerbose, plan, ps |
| Constructor Summary | |
|---|---|
|
DotPlanDumper(P plan,
PrintStream ps)
|
protected |
DotPlanDumper(P plan,
PrintStream ps,
boolean isSubGraph,
Set<Operator> mSubgraphs,
Set<Operator> mMultiInputSubgraphs,
Set<Operator> mMultiOutputSubgraphs)
|
| Method Summary | |
|---|---|
void |
dump()
This is the public interface. |
protected void |
dumpEdge(Operator op,
Operator suc)
Will be called to dump the edges of the plan. |
protected void |
dumpInvisibleOperators(E op)
|
protected void |
dumpMultiInputNestedOperator(E op,
MultiMap<E,S> plans)
Will be called when an operator has nested plans, which are connected to one of the multiple inputs. |
protected void |
dumpMultiOutputNestedOperator(E op,
Collection<S> plans)
Will be called for nested operators, where the plans represent how the output of the operator is processed. |
protected void |
dumpNestedOperator(E op,
Collection<S> plans)
Will be called for nested operators. |
protected void |
dumpOperator(E op)
Will be called to dump a simple operator |
protected String[] |
getAttributes(E op)
Used to generate the the attributes of a node |
protected String |
getName(E op)
Used to generate the label for an operator. |
protected PlanDumper |
makeDumper(S plan,
PrintStream ps)
makeDumper is a factory method. |
| Methods inherited from class org.apache.pig.impl.plan.PlanDumper |
|---|
getMultiInputNestedPlans, getMultiOutputNestedPlans, getNestedPlans, isVerbose, join, setVerbose |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Set<Operator> mSubgraphs
protected Set<Operator> mMultiInputSubgraphs
protected Set<Operator> mMultiOutputSubgraphs
| Constructor Detail |
|---|
public DotPlanDumper(P plan,
PrintStream ps)
protected DotPlanDumper(P plan,
PrintStream ps,
boolean isSubGraph,
Set<Operator> mSubgraphs,
Set<Operator> mMultiInputSubgraphs,
Set<Operator> mMultiOutputSubgraphs)
| Method Detail |
|---|
public void dump()
PlanDumper
dump in class PlanDumper<E extends Operator,P extends OperatorPlan<E>,S extends OperatorPlan<N>>
protected void dumpMultiInputNestedOperator(E op,
MultiMap<E,S> plans)
PlanDumper
dumpMultiInputNestedOperator in class PlanDumper<E extends Operator,P extends OperatorPlan<E>,S extends OperatorPlan<N>>op - the nested operatorplans - a map of input operator to connected nested plan
protected void dumpMultiOutputNestedOperator(E op,
Collection<S> plans)
PlanDumper
dumpMultiOutputNestedOperator in class PlanDumper<E extends Operator,P extends OperatorPlan<E>,S extends OperatorPlan<N>>op - the nested operatorplans - a collection of sub plans.
protected void dumpNestedOperator(E op,
Collection<S> plans)
PlanDumper
dumpNestedOperator in class PlanDumper<E extends Operator,P extends OperatorPlan<E>,S extends OperatorPlan<N>>op - the nested operatorplans - a collection of sub plans.protected void dumpOperator(E op)
PlanDumper
dumpOperator in class PlanDumper<E extends Operator,P extends OperatorPlan<E>,S extends OperatorPlan<N>>op - the operator to be dumped
protected void dumpEdge(Operator op,
Operator suc)
PlanDumper
dumpEdge in class PlanDumper<E extends Operator,P extends OperatorPlan<E>,S extends OperatorPlan<N>>op - tail of the edgesuc - head of the edge
protected PlanDumper makeDumper(S plan,
PrintStream ps)
PlanDumper
makeDumper in class PlanDumper<E extends Operator,P extends OperatorPlan<E>,S extends OperatorPlan<N>>plan - Plan that the new dumper should handle
protected String getName(E op)
op - operator to dumpprotected String[] getAttributes(E op)
op - operatorprotected void dumpInvisibleOperators(E op)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||