org.apache.pig.backend.executionengine
Interface ExecutionEngine

All Known Implementing Classes:
HExecutionEngine, LocalExecutionEngine

public interface ExecutionEngine

TODO: provide a manner to generate/collect logging information for DBG purposes TODO: add keys for properties/statistics


Method Summary
 Collection<String> activeScopes()
          List scopes that are active in the back-end
 void close()
          Clean-up and releasing of resources.
 ExecPhysicalPlan compile(ExecLogicalPlan[] plans, Properties properties)
           
 ExecPhysicalPlan 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.
 ExecJob execute(ExecPhysicalPlan plan)
          Execute the physical plan in blocking mode.
 Properties getConfiguration()
          Provides configuration information about the execution engine itself.
 DataStorage getDataStorage()
           
 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)
 ExecJob 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.
 

Method Detail

init

void init()
          throws ExecException
Place holder for possible initialization activities.

Throws:
ExecException

close

void close()
           throws ExecException
Clean-up and releasing of resources.

Throws:
ExecException

getDataStorage

DataStorage getDataStorage()

getConfiguration

Properties getConfiguration()
                            throws ExecException
Provides configuration information about the execution engine itself.

Returns:
- information about the configuration used to connect to execution engine
Throws:
ExecException

updateConfiguration

void updateConfiguration(Properties newConfiguration)
                         throws ExecException
Provides a way to dynamically change configuration parameters at the Execution Engine level.

Parameters:
newConfiguration - - the new configuration settings
Throws:
when - configuration conflicts are detected
ExecException

getStatistics

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

Returns:
ExecutionEngineProperties
Throws:
ExecException

compile

ExecPhysicalPlan compile(ExecLogicalPlan plan,
                         Properties properties)
                         throws ExecException
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.

Parameters:
logical - plan
properties -
Returns:
physical plan
Throws:
ExecException

compile

ExecPhysicalPlan compile(ExecLogicalPlan[] plans,
                         Properties properties)
                         throws ExecException
Throws:
ExecException

execute

ExecJob execute(ExecPhysicalPlan plan)
                throws ExecException
Execute the physical plan in blocking mode.

Throws:
ExecException

submit

ExecJob submit(ExecPhysicalPlan plan)
               throws ExecException
Execute the physical plan in non-blocking mode

Throws:
ExecException

runningJobs

Collection<ExecJob> runningJobs(Properties properties)
                                throws ExecException
Return currently running jobs (can be useful for admin purposes)

Returns:
Throws:
ExecException

activeScopes

Collection<String> activeScopes()
                                throws ExecException
List scopes that are active in the back-end

Returns:
Throws:
ExecException

reclaimScope

void reclaimScope(String scope)
                  throws ExecException
A mechanism to communicate to the back-end that a set of logical plans go out of scope

Parameters:
scope -
Throws:
ExecException


Copyright © ${year} The Apache Software Foundation