org.apache.pig.backend.hadoop.executionengine
Class HJob

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

public class HJob
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  String alias
           
protected  Exception backendException
           
protected  FileSpec outFileSpec
           
protected  PigContext pigContext
           
protected  POStore poStore
           
protected  ExecJob.JOB_STATUS status
           
 
Fields inherited from interface org.apache.pig.backend.executionengine.ExecJob
PROGRESS_KEY
 
Constructor Summary
HJob(ExecJob.JOB_STATUS status, PigContext pigContext, POStore store, String alias)
           
HJob(ExecJob.JOB_STATUS status, PigContext pigContext, POStore store, String alias, PigStats stats)
           
 
Method Summary
 void completionNotification(Object cookie)
          hook for asynchronous notification of job completion pushed from the back-end
 String getAlias()
          Returns the alias of relation generated by this job
 Properties getConfiguration()
          Get configuration information
 Exception getException()
          Get exceptions that happened during execution
 void getLogs(OutputStream log)
          Collecting various forms of outputs
 POStore getPOStore()
           
 Iterator<Tuple> getResults()
          if query has executed successfully we want to retrieve the results via iterating over them.
 PigStats 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.
 void setException(Exception e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

status

protected ExecJob.JOB_STATUS status

pigContext

protected PigContext pigContext

outFileSpec

protected FileSpec outFileSpec

backendException

protected Exception backendException

alias

protected String alias

poStore

protected POStore poStore
Constructor Detail

HJob

public HJob(ExecJob.JOB_STATUS status,
            PigContext pigContext,
            POStore store,
            String alias)

HJob

public HJob(ExecJob.JOB_STATUS status,
            PigContext pigContext,
            POStore store,
            String alias,
            PigStats stats)
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:
true if execution has completed, false otherwise.
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:
iterator for resulting tuples
Throws:
ExecException

getConfiguration

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

Specified by:
getConfiguration in interface ExecJob
Returns:
configuration information for the execution engine

getStatistics

public PigStats 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:
statistics relevant to the execution engine

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

setException

public void setException(Exception e)

getException

public Exception getException()
Description copied from interface: ExecJob
Get exceptions that happened during execution

Specified by:
getException in interface ExecJob

getAlias

public String getAlias()
                throws ExecException
Description copied from interface: ExecJob
Returns the alias of relation generated by this job

Specified by:
getAlias in interface ExecJob
Throws:
ExecException

getPOStore

public POStore getPOStore()
Specified by:
getPOStore in interface ExecJob
Returns:
the poStore


Copyright © ${year} The Apache Software Foundation