org.apache.pig.newplan.logical
Class DotLOPrinter

java.lang.Object
  extended by org.apache.pig.newplan.PlanDumper
      extended by org.apache.pig.newplan.DotPlanDumper
          extended by org.apache.pig.newplan.logical.DotLOPrinter

public class DotLOPrinter
extends DotPlanDumper

This class can print a logical plan in the DOT format. It uses clusters to illustrate nesting. If "verbose" is off, it will skip any nesting.


Field Summary
 
Fields inherited from class org.apache.pig.newplan.DotPlanDumper
mMultiInputSubgraphs, mMultiOutputSubgraphs, mSubgraphs
 
Fields inherited from class org.apache.pig.newplan.PlanDumper
isVerbose, plan, ps
 
Constructor Summary
DotLOPrinter(BaseOperatorPlan plan, PrintStream ps)
           
 
Method Summary
protected  String[] getAttributes(Operator op)
          Used to generate the the attributes of a node
protected  MultiMap<Operator,BaseOperatorPlan> getMultiInputNestedPlans(Operator op)
          Used to determine if an operator has nested plans, which are connected to specific input operators.
protected  String getName(Operator op)
          Used to generate the label for an operator.
protected  Collection<BaseOperatorPlan> getNestedPlans(Operator op)
          Used to determine if an operator has nested plans (without connections to in- or output operators.
protected  DotPlanDumper makeDumper(BaseOperatorPlan plan, PrintStream ps)
          makeDumper is a factory method.
protected  boolean reverse(BaseOperatorPlan plan)
           
 
Methods inherited from class org.apache.pig.newplan.DotPlanDumper
dump, dumpEdge, dumpInvisibleOperators, dumpMultiInputNestedOperator, dumpMultiOutputNestedOperator, dumpNestedOperator, dumpOperator
 
Methods inherited from class org.apache.pig.newplan.PlanDumper
getMultiOutputNestedPlans, isVerbose, join, setVerbose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DotLOPrinter

public DotLOPrinter(BaseOperatorPlan plan,
                    PrintStream ps)
Method Detail

makeDumper

protected DotPlanDumper makeDumper(BaseOperatorPlan plan,
                                   PrintStream ps)
Description copied from class: PlanDumper
makeDumper is a factory method. Used by subclasses to specify what dumper should handle the nested plan.

Overrides:
makeDumper in class DotPlanDumper
Parameters:
plan - Plan that the new dumper should handle
Returns:
the dumper for plan

getName

protected String getName(Operator op)
Description copied from class: DotPlanDumper
Used to generate the label for an operator.

Overrides:
getName in class DotPlanDumper
Parameters:
op - operator to dump

getAttributes

protected String[] getAttributes(Operator op)
Description copied from class: DotPlanDumper
Used to generate the the attributes of a node

Overrides:
getAttributes in class DotPlanDumper
Parameters:
op - operator

getMultiInputNestedPlans

protected MultiMap<Operator,BaseOperatorPlan> getMultiInputNestedPlans(Operator op)
Description copied from class: PlanDumper
Used to determine if an operator has nested plans, which are connected to specific input operators.

Overrides:
getMultiInputNestedPlans in class PlanDumper
Parameters:
op - operator
Returns:
Map describing the input to nested plan relationship.

getNestedPlans

protected Collection<BaseOperatorPlan> getNestedPlans(Operator op)
Description copied from class: PlanDumper
Used to determine if an operator has nested plans (without connections to in- or output operators.

Overrides:
getNestedPlans in class PlanDumper
Parameters:
op - operator
Returns:
Collection of nested plans.

reverse

protected boolean reverse(BaseOperatorPlan plan)
Overrides:
reverse in class DotPlanDumper


Copyright © 2007-2012 The Apache Software Foundation