org.apache.pig.backend.hadoop.executionengine.fetch
Class FetchOptimizer

java.lang.Object
  extended by org.apache.pig.backend.hadoop.executionengine.fetch.FetchOptimizer

public class FetchOptimizer
extends Object

FetchOptimizer determines whether the entire physical plan is fetchable, meaning that the task's result can be directly read (fetched) from the underlying storage rather than creating MR jobs. During the check FetchablePlanVisitor is used to walk through the plan.


Constructor Summary
FetchOptimizer()
           
 
Method Summary
static boolean isFetchEnabled(PigContext pc)
          Checks whether the fetch is enabled
static boolean isPlanFetchable(PigContext pc, PhysicalPlan pp)
          Visits the plan with FetchablePlanVisitor and checks whether the plan is fetchable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FetchOptimizer

public FetchOptimizer()
Method Detail

isFetchEnabled

public static boolean isFetchEnabled(PigContext pc)
Checks whether the fetch is enabled

Parameters:
pc -
Returns:
true if fetching is enabled

isPlanFetchable

public static boolean isPlanFetchable(PigContext pc,
                                      PhysicalPlan pp)
                               throws VisitorException
Visits the plan with FetchablePlanVisitor and checks whether the plan is fetchable.

Parameters:
pc - PigContext
pp - the physical plan to be examined
Returns:
true if the plan is fetchable
Throws:
VisitorException


Copyright © 2007-2012 The Apache Software Foundation