org.apache.pig.backend.hadoop.executionengine.mapReduceLayer
Class LocalExecType

java.lang.Object
  extended by org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.LocalExecType
All Implemented Interfaces:
Serializable, ExecType

public class LocalExecType
extends Object
implements ExecType

LocalExecType is the ExecType for local mode in Hadoop Mapreduce.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.pig.ExecType
LOCAL, MAPREDUCE
 
Constructor Summary
LocalExecType()
           
 
Method Summary
 boolean accepts(Properties properties)
          An ExecType is selected based off the Properties for the given script.
 ExecutionEngine getExecutionEngine(PigContext pigContext)
          Returns the Execution Engine that this ExecType is associated with.
 Class getExecutionEngineClass()
          Returns the Execution Engine class that this ExecType is associated with.
 boolean isLocal()
          An ExecType is classified as local if it runs in-process and through the local filesystem.
 String name()
          Returns the canonical name for this ExecType.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalExecType

public LocalExecType()
Method Detail

accepts

public boolean accepts(Properties properties)
Description copied from interface: ExecType
An ExecType is selected based off the Properties for the given script. There may be multiple settings that trigger the selection of a given ExecType. For example, distributed MR mode is currently triggered if the user specifies "mapred" or "mapreduce". It is desirable to override the toString method of the given ExecType to uniquely identify the ExecType. The initialize method should return true if it accepts the properties or false if it does not. The Java ServiceLoader framework will be used to iterate through and select the correct ExecType.

Specified by:
accepts in interface ExecType

getExecutionEngine

public ExecutionEngine getExecutionEngine(PigContext pigContext)
Description copied from interface: ExecType
Returns the Execution Engine that this ExecType is associated with. Once the ExecType the script is running in is determined by the PigServer, it will then call this method to get an instance of the ExecutionEngine associated with this ExecType to delegate all further execution to on the backend.

Specified by:
getExecutionEngine in interface ExecType

getExecutionEngineClass

public Class getExecutionEngineClass()
Description copied from interface: ExecType
Returns the Execution Engine class that this ExecType is associated with. This method simply returns the class of the ExecutionEngine associated with this ExecType, and not an instance of it.

Specified by:
getExecutionEngineClass in interface ExecType

isLocal

public boolean isLocal()
Description copied from interface: ExecType
An ExecType is classified as local if it runs in-process and through the local filesystem. While an ExecutionEngine may have a more nuanced notion of local mode, these are the qualifications Pig requires. ExecutionEngines can extend the ExecType interface to additionally differentiate between ExecTypes as necessary.

Specified by:
isLocal in interface ExecType

name

public String name()
Description copied from interface: ExecType
Returns the canonical name for this ExecType.

Specified by:
name in interface ExecType
Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2012 The Apache Software Foundation