org.apache.pig.backend.hadoop.executionengine.fetch
Class FetchOptimizer
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FetchOptimizer
public FetchOptimizer()
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
- PigContextpp
- the physical plan to be examined
- Returns:
- true if the plan is fetchable
- Throws:
VisitorException
Copyright © 2007-2012 The Apache Software Foundation