public class PlanDumper<E extends Operator,P extends OperatorPlan<E>,S extends OperatorPlan<? extends Operator>>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
isVerbose |
protected P |
plan |
protected java.io.PrintStream |
ps |
Constructor and Description |
---|
PlanDumper(P plan,
java.io.PrintStream ps) |
Modifier and Type | Method and Description |
---|---|
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 |
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,
java.util.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,
java.util.Collection<S> plans)
Will be called for nested operators.
|
protected void |
dumpOperator(E op)
Will be called to dump a simple operator
|
protected MultiMap<E,S> |
getMultiInputNestedPlans(E op)
Used to determine if an operator has nested plans, which are
connected to specific input operators.
|
protected java.util.Collection<S> |
getMultiOutputNestedPlans(E op)
Used to determine if an operator has nested output plans
|
protected java.util.Collection<S> |
getNestedPlans(E op)
Used to determine if an operator has nested plans (without
connections to in- or output operators.
|
boolean |
isVerbose() |
protected void |
join(java.lang.String sep,
java.lang.String[] strings)
Helper function to print a string array.
|
protected PlanDumper |
makeDumper(S plan,
java.io.PrintStream ps)
makeDumper is a factory method.
|
void |
setVerbose(boolean verbose) |
protected java.io.PrintStream ps
protected P extends OperatorPlan<E> plan
protected boolean isVerbose
public PlanDumper(P plan, java.io.PrintStream ps)
public void setVerbose(boolean verbose)
public boolean isVerbose()
public void dump()
protected PlanDumper makeDumper(S plan, java.io.PrintStream ps)
plan
- Plan that the new dumper should handleprotected void dumpOperator(E op)
op
- the operator to be dumpedprotected void dumpMultiInputNestedOperator(E op, MultiMap<E,S> plans)
op
- the nested operatorplans
- a map of input operator to connected nested planprotected void dumpMultiOutputNestedOperator(E op, java.util.Collection<S> plans)
op
- the nested operatorplans
- a collection of sub plans.protected void dumpNestedOperator(E op, java.util.Collection<S> plans)
op
- the nested operatorplans
- a collection of sub plans.protected void dumpEdge(Operator op, Operator suc)
op
- tail of the edgesuc
- head of the edgeprotected MultiMap<E,S> getMultiInputNestedPlans(E op)
op
- operatorprotected java.util.Collection<S> getMultiOutputNestedPlans(E op)
op
- operatorprotected java.util.Collection<S> getNestedPlans(E op)
op
- operatorprotected void join(java.lang.String sep, java.lang.String[] strings)
sep
- Separatorstrings
- Array to printCopyright © 2007-2012 The Apache Software Foundation