org.apache.hadoop.mapred
Class CompletedJobStatusStore

java.lang.Object
  extended by org.apache.hadoop.mapred.CompletedJobStatusStore
All Implemented Interfaces:
Runnable

public class CompletedJobStatusStore
extends Object
implements Runnable

Persists and retrieves the Job info of a job into/from DFS.

If the retain time is zero jobs are not persisted.

A daemon thread cleans up job info files older than the retain time

The retain time can be set with the 'persist.jobstatus.hours' configuration variable (it is in hours).


Field Summary
static org.apache.commons.logging.Log LOG
           
 
Method Summary
 boolean isActive()
          Indicates if job status persistency is active or not.
 Counters readCounters(String jobId)
          This method retrieves Counters information from DFS stored using store method.
 JobProfile readJobProfile(String jobId)
          This method retrieves JobProfile information from DFS stored using store method.
 JobStatus readJobStatus(String jobId)
          This method retrieves JobStatus information from DFS stored using store method.
 TaskCompletionEvent[] readJobTaskCompletionEvents(String jobId, int fromEventId, int maxEvents)
          This method retrieves TaskCompletionEvents information from DFS stored using store method.
 void run()
           
 void store(org.apache.hadoop.mapred.JobInProgress job)
          Persists a job in DFS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Method Detail

isActive

public boolean isActive()
Indicates if job status persistency is active or not.

Returns:
TRUE if active, FALSE otherwise.

run

public void run()
Specified by:
run in interface Runnable

store

public void store(org.apache.hadoop.mapred.JobInProgress job)
Persists a job in DFS.

Parameters:
job - the job about to be 'retired'

readJobStatus

public JobStatus readJobStatus(String jobId)
This method retrieves JobStatus information from DFS stored using store method.

Parameters:
jobId - the jobId for which jobStatus is queried
Returns:
JobStatus object, null if not able to retrieve

readJobProfile

public JobProfile readJobProfile(String jobId)
This method retrieves JobProfile information from DFS stored using store method.

Parameters:
jobId - the jobId for which jobProfile is queried
Returns:
JobProfile object, null if not able to retrieve

readCounters

public Counters readCounters(String jobId)
This method retrieves Counters information from DFS stored using store method.

Parameters:
jobId - the jobId for which Counters is queried
Returns:
Counters object, null if not able to retrieve

readJobTaskCompletionEvents

public TaskCompletionEvent[] readJobTaskCompletionEvents(String jobId,
                                                         int fromEventId,
                                                         int maxEvents)
This method retrieves TaskCompletionEvents information from DFS stored using store method.

Parameters:
jobId - the jobId for which TaskCompletionEvents is queried
fromEventId - events offset
maxEvents - max number of events
Returns:
TaskCompletionEvent[], empty array if not able to retrieve


Copyright © 2006 The Apache Software Foundation