org.apache.pig.backend.executionengine
Interface ExecJob

All Known Implementing Classes:
HJob, LocalJob

public interface ExecJob

Abstraction on a job that the execution engine runs. It allows the front-end to retrieve information on job status and manage a running job.


Nested Class Summary
static class ExecJob.JOB_STATUS
           
 
Field Summary
static String PROGRESS_KEY
           
 
Method Summary
 void completionNotification(Object cookie)
          hook for asynchronous notification of job completion pushed from the back-end
 Properties getContiguration()
          Get configuration information
 void getLogs(OutputStream log)
          Collecting various forms of outputs
 Iterator<Tuple> getResults()
          if query has executed successfully we want to retrieve the results via iterating over them.
 Map<String,Object> getStatistics()
          Can be information about the state (not submitted, e.g.
 ExecJob.JOB_STATUS getStatus()
           
 void getSTDError(OutputStream error)
           
 void getSTDOut(OutputStream out)
           
 boolean hasCompleted()
          true is the physical plan has executed successfully and results are ready to be retrieved
 void kill()
          Kills current job.
 

Field Detail

PROGRESS_KEY

static final String PROGRESS_KEY
See Also:
Constant Field Values
Method Detail

getStatus

ExecJob.JOB_STATUS getStatus()

hasCompleted

boolean hasCompleted()
                     throws ExecException
true is the physical plan has executed successfully and results are ready to be retrieved

Returns:
Throws:
ExecException

getResults

Iterator<Tuple> getResults()
                           throws ExecException
if query has executed successfully we want to retrieve the results via iterating over them.

Returns:
Throws:
ExecException

getContiguration

Properties getContiguration()
Get configuration information

Returns:

getStatistics

Map<String,Object> getStatistics()
Can be information about the state (not submitted, e.g. the execute method has not been called yet; not running, e.g. execute has been issued, but job is waiting; running...; completed; aborted...; progress information

Returns:

completionNotification

void completionNotification(Object cookie)
hook for asynchronous notification of job completion pushed from the back-end


kill

void kill()
          throws ExecException
Kills current job.

Throws:
ExecException

getLogs

void getLogs(OutputStream log)
             throws ExecException
Collecting various forms of outputs

Throws:
ExecException

getSTDOut

void getSTDOut(OutputStream out)
               throws ExecException
Throws:
ExecException

getSTDError

void getSTDError(OutputStream error)
                 throws ExecException
Throws:
ExecException


Copyright © ${year} The Apache Software Foundation