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

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

public class LocalJob
extends Object
implements ExecJob


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.pig.backend.executionengine.ExecJob
ExecJob.JOB_STATUS
 
Field Summary
protected  DataBag results
           
protected  ExecJob.JOB_STATUS status
           
 
Fields inherited from interface org.apache.pig.backend.executionengine.ExecJob
PROGRESS_KEY
 
Constructor Summary
LocalJob(DataBag results, ExecJob.JOB_STATUS status)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

results

protected DataBag results

status

protected ExecJob.JOB_STATUS status
Constructor Detail

LocalJob

public LocalJob(DataBag results,
                ExecJob.JOB_STATUS status)
Method Detail

getStatus

public ExecJob.JOB_STATUS getStatus()
Specified by:
getStatus in interface ExecJob

hasCompleted

public boolean hasCompleted()
                     throws ExecException
Description copied from interface: ExecJob
true is the physical plan has executed successfully and results are ready to be retrieved

Specified by:
hasCompleted in interface ExecJob
Returns:
Throws:
ExecException

getResults

public Iterator<Tuple> getResults()
                           throws ExecException
Description copied from interface: ExecJob
if query has executed successfully we want to retrieve the results via iterating over them.

Specified by:
getResults in interface ExecJob
Returns:
Throws:
ExecException

getContiguration

public Properties getContiguration()
Description copied from interface: ExecJob
Get configuration information

Specified by:
getContiguration in interface ExecJob
Returns:

getStatistics

public Map<String,Object> getStatistics()
Description copied from interface: ExecJob
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

Specified by:
getStatistics in interface ExecJob
Returns:

completionNotification

public void completionNotification(Object cookie)
Description copied from interface: ExecJob
hook for asynchronous notification of job completion pushed from the back-end

Specified by:
completionNotification in interface ExecJob

kill

public void kill()
          throws ExecException
Description copied from interface: ExecJob
Kills current job.

Specified by:
kill in interface ExecJob
Throws:
ExecException

getLogs

public void getLogs(OutputStream log)
             throws ExecException
Description copied from interface: ExecJob
Collecting various forms of outputs

Specified by:
getLogs in interface ExecJob
Throws:
ExecException

getSTDOut

public void getSTDOut(OutputStream out)
               throws ExecException
Specified by:
getSTDOut in interface ExecJob
Throws:
ExecException

getSTDError

public void getSTDError(OutputStream error)
                 throws ExecException
Specified by:
getSTDError in interface ExecJob
Throws:
ExecException


Copyright © ${year} The Apache Software Foundation