org.apache.pig.impl.logicalLayer
Class DotLOPrinter

java.lang.Object
  extended by org.apache.pig.impl.plan.PlanDumper<E,P,S>
      extended by org.apache.pig.impl.plan.DotPlanDumper<LogicalOperator,LogicalPlan,LogicalOperator,LogicalPlan>
          extended by org.apache.pig.impl.logicalLayer.DotLOPrinter

public class DotLOPrinter
extends DotPlanDumper<LogicalOperator,LogicalPlan,LogicalOperator,LogicalPlan>

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.impl.plan.DotPlanDumper
mMultiInputSubgraphs, mMultiOutputSubgraphs, mSubgraphs
 
Fields inherited from class org.apache.pig.impl.plan.PlanDumper
isVerbose, plan, ps
 
Constructor Summary
DotLOPrinter(LogicalPlan plan, PrintStream ps)
           
 
Method Summary
protected  String[] getAttributes(LogicalOperator op)
          Used to generate the the attributes of a node
protected  MultiMap<LogicalOperator,LogicalPlan> getMultiInputNestedPlans(LogicalOperator op)
          Used to determine if an operator has nested plans, which are connected to specific input operators.
protected  String getName(LogicalOperator op)
          Used to generate the label for an operator.
protected  Collection<LogicalPlan> getNestedPlans(LogicalOperator op)
          Used to determine if an operator has nested plans (without connections to in- or output operators.
protected  DotPlanDumper makeDumper(LogicalPlan plan, PrintStream ps)
          makeDumper is a factory method.
 
Methods inherited from class org.apache.pig.impl.plan.DotPlanDumper
dump, dumpEdge, dumpInvisibleOperators, dumpMultiInputNestedOperator, dumpMultiOutputNestedOperator, dumpNestedOperator, dumpOperator
 
Methods inherited from class org.apache.pig.impl.plan.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(LogicalPlan plan,
                    PrintStream ps)
Method Detail

makeDumper

protected DotPlanDumper makeDumper(LogicalPlan 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<LogicalOperator,LogicalPlan,LogicalOperator,LogicalPlan>
Parameters:
plan - Plan that the new dumper should handle
Returns:
the dumper for plan

getName

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

Overrides:
getName in class DotPlanDumper<LogicalOperator,LogicalPlan,LogicalOperator,LogicalPlan>
Parameters:
op - operator to dump

getAttributes

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

Overrides:
getAttributes in class DotPlanDumper<LogicalOperator,LogicalPlan,LogicalOperator,LogicalPlan>
Parameters:
op - operator

getMultiInputNestedPlans

protected MultiMap<LogicalOperator,LogicalPlan> getMultiInputNestedPlans(LogicalOperator 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<LogicalOperator,LogicalPlan,LogicalPlan>
Parameters:
op - operator
Returns:
Map describing the input to nested plan relationship.

getNestedPlans

protected Collection<LogicalPlan> getNestedPlans(LogicalOperator 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<LogicalOperator,LogicalPlan,LogicalPlan>
Parameters:
op - operator
Returns:
Collection of nested plans.


Copyright © ${year} The Apache Software Foundation