org.apache.pig.backend.hadoop.executionengine.physicalLayer.util
Class PlanHelper

java.lang.Object
  extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.util.PlanHelper

public class PlanHelper
extends Object

Utility class with a few helper functions to deal with physical plans.


Method Summary
static
<C extends PhysicalOperator>
boolean
containsPhysicalOperator(PhysicalPlan plan, Class<C> opClass)
           
static
<C extends PhysicalOperator>
LinkedList<C>
getPhysicalOperators(PhysicalPlan plan, Class<C> opClass)
          Returns a LinkedList of operators contained within the physical plan which implement the supplied class, in dependency order.
static String makeStoreTmpPath(String orig)
          Creates a relative path that can be used to build a temporary place to store the output from a number of map-reduce tasks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeStoreTmpPath

public static String makeStoreTmpPath(String orig)
Creates a relative path that can be used to build a temporary place to store the output from a number of map-reduce tasks.


containsPhysicalOperator

public static <C extends PhysicalOperator> boolean containsPhysicalOperator(PhysicalPlan plan,
                                                                            Class<C> opClass)
                                        throws VisitorException
Throws:
VisitorException

getPhysicalOperators

public static <C extends PhysicalOperator> LinkedList<C> getPhysicalOperators(PhysicalPlan plan,
                                                                              Class<C> opClass)
                                                                   throws VisitorException
Returns a LinkedList of operators contained within the physical plan which implement the supplied class, in dependency order. Returns an empty LinkedList of no such operators exist.

Parameters:
plan -
opClass -
Returns:
a LinkedList of operators contained within the plan which implement the supplied class; empty if no such ops exist.
Throws:
VisitorException


Copyright © 2007-2012 The Apache Software Foundation