org.apache.pig.backend.local.executionengine
Class LocalExecutionEngine

java.lang.Object
  extended by org.apache.pig.backend.local.executionengine.LocalExecutionEngine
All Implemented Interfaces:
ExecutionEngine

public class LocalExecutionEngine
extends Object
implements ExecutionEngine


Field Summary
protected  DataStorage ds
           
protected  Map<OperatorKey,OperatorKey> logicalToPhysicalKeys
           
protected  Map<OperatorKey,LocalResult> materializedResults
           
protected  NodeIdGenerator nodeIdGenerator
           
protected  Map<OperatorKey,ExecPhysicalOperator> physicalOpTable
           
protected  PigContext pigContext
           
 
Constructor Summary
LocalExecutionEngine(PigContext pigContext)
           
 
Method Summary
 Collection<String> activeScopes()
          List scopes that are active in the back-end
 void close()
          Clean-up and releasing of resources.
 LocalPhysicalPlan compile(ExecLogicalPlan[] plans, Properties properties)
           
 LocalPhysicalPlan compile(ExecLogicalPlan plan, Properties properties)
          Compiles a logical plan into a physical plan, given a set of configuration properties that apply at the plan-level.
 LocalJob execute(ExecPhysicalPlan plan)
          Execute the physical plan in blocking mode.
 Properties getConfiguration()
          Provides configuration information about the execution engine itself.
 DataStorage getDataStorage()
           
 Map<OperatorKey,OperatorKey> getLogicalToPhysicalMap()
           
 Map<String,Object> getStatistics()
          Provides statistics on the Execution Engine: number of nodes, node failure rates, average load, average job wait time...
 void init()
          Place holder for possible initialization activities.
 void reclaimScope(String scope)
          A mechanism to communicate to the back-end that a set of logical plans go out of scope
 Collection<ExecJob> runningJobs(Properties properties)
          Return currently running jobs (can be useful for admin purposes)
 LocalJob submit(ExecPhysicalPlan plan)
          Execute the physical plan in non-blocking mode
 void updateConfiguration(Properties newConfiguration)
          Provides a way to dynamically change configuration parameters at the Execution Engine level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pigContext

protected PigContext pigContext

ds

protected DataStorage ds

nodeIdGenerator

protected NodeIdGenerator nodeIdGenerator

logicalToPhysicalKeys

protected Map<OperatorKey,OperatorKey> logicalToPhysicalKeys

physicalOpTable

protected Map<OperatorKey,ExecPhysicalOperator> physicalOpTable

materializedResults

protected Map<OperatorKey,LocalResult> materializedResults
Constructor Detail

LocalExecutionEngine

public LocalExecutionEngine(PigContext pigContext)
Method Detail

getLogicalToPhysicalMap

public Map<OperatorKey,OperatorKey> getLogicalToPhysicalMap()

getDataStorage

public DataStorage getDataStorage()
Specified by:
getDataStorage in interface ExecutionEngine

init

public void init()
          throws ExecException
Description copied from interface: ExecutionEngine
Place holder for possible initialization activities.

Specified by:
init in interface ExecutionEngine
Throws:
ExecException

close

public void close()
           throws ExecException
Description copied from interface: ExecutionEngine
Clean-up and releasing of resources.

Specified by:
close in interface ExecutionEngine
Throws:
ExecException

getConfiguration

public Properties getConfiguration()
                            throws ExecException
Description copied from interface: ExecutionEngine
Provides configuration information about the execution engine itself.

Specified by:
getConfiguration in interface ExecutionEngine
Returns:
- information about the configuration used to connect to execution engine
Throws:
ExecException

updateConfiguration

public void updateConfiguration(Properties newConfiguration)
                         throws ExecException
Description copied from interface: ExecutionEngine
Provides a way to dynamically change configuration parameters at the Execution Engine level.

Specified by:
updateConfiguration in interface ExecutionEngine
Parameters:
newConfiguration - - the new configuration settings
Throws:
ExecException

getStatistics

public Map<String,Object> getStatistics()
                                 throws ExecException
Description copied from interface: ExecutionEngine
Provides statistics on the Execution Engine: number of nodes, node failure rates, average load, average job wait time...

Specified by:
getStatistics in interface ExecutionEngine
Returns:
ExecutionEngineProperties
Throws:
ExecException

compile

public LocalPhysicalPlan compile(ExecLogicalPlan plan,
                                 Properties properties)
                          throws ExecException
Description copied from interface: ExecutionEngine
Compiles a logical plan into a physical plan, given a set of configuration properties that apply at the plan-level. For instance desired degree of parallelism for this plan, which could be different from the "default" one set at the execution engine level.

Specified by:
compile in interface ExecutionEngine
Returns:
physical plan
Throws:
ExecException

compile

public LocalPhysicalPlan compile(ExecLogicalPlan[] plans,
                                 Properties properties)
                          throws ExecException
Specified by:
compile in interface ExecutionEngine
Throws:
ExecException

execute

public LocalJob execute(ExecPhysicalPlan plan)
                 throws ExecException
Description copied from interface: ExecutionEngine
Execute the physical plan in blocking mode.

Specified by:
execute in interface ExecutionEngine
Throws:
ExecException

submit

public LocalJob submit(ExecPhysicalPlan plan)
                throws ExecException
Description copied from interface: ExecutionEngine
Execute the physical plan in non-blocking mode

Specified by:
submit in interface ExecutionEngine
Throws:
ExecException

runningJobs

public Collection<ExecJob> runningJobs(Properties properties)
                                throws ExecException
Description copied from interface: ExecutionEngine
Return currently running jobs (can be useful for admin purposes)

Specified by:
runningJobs in interface ExecutionEngine
Returns:
Throws:
ExecException

activeScopes

public Collection<String> activeScopes()
                                throws ExecException
Description copied from interface: ExecutionEngine
List scopes that are active in the back-end

Specified by:
activeScopes in interface ExecutionEngine
Returns:
Throws:
ExecException

reclaimScope

public void reclaimScope(String scope)
                  throws ExecException
Description copied from interface: ExecutionEngine
A mechanism to communicate to the back-end that a set of logical plans go out of scope

Specified by:
reclaimScope in interface ExecutionEngine
Throws:
ExecException


Copyright © ${year} The Apache Software Foundation