org.apache.hadoop.mapreduce.v2.hs
Class JobHistory

java.lang.Object
  extended by org.apache.hadoop.yarn.service.AbstractService
      extended by org.apache.hadoop.mapreduce.v2.hs.JobHistory
All Implemented Interfaces:
org.apache.hadoop.mapreduce.v2.app.AppContext, HistoryContext, org.apache.hadoop.yarn.service.Service

public class JobHistory
extends org.apache.hadoop.yarn.service.AbstractService
implements HistoryContext

Loads and manages the Job history cache.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.yarn.service.Service
org.apache.hadoop.yarn.service.Service.STATE
 
Field Summary
static Pattern CONF_FILENAME_REGEX
           
static String OLD_SUFFIX
           
 
Constructor Summary
JobHistory()
           
 
Method Summary
 Map<org.apache.hadoop.mapreduce.v2.api.records.JobId,org.apache.hadoop.mapreduce.v2.app.job.Job> getAllJobs()
           
 Map<org.apache.hadoop.mapreduce.v2.api.records.JobId,org.apache.hadoop.mapreduce.v2.app.job.Job> getAllJobs(org.apache.hadoop.yarn.api.records.ApplicationId appID)
           
 org.apache.hadoop.yarn.api.records.ApplicationAttemptId getApplicationAttemptId()
           
 org.apache.hadoop.yarn.api.records.ApplicationId getApplicationID()
           
 String getApplicationName()
           
 org.apache.hadoop.yarn.Clock getClock()
           
 org.apache.hadoop.yarn.ClusterInfo getClusterInfo()
           
 org.apache.hadoop.yarn.event.EventHandler getEventHandler()
           
 org.apache.hadoop.mapreduce.v2.app.job.Job getJob(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId)
           
 JobsInfo getPartialJobs(Long offset, Long count, String user, String queue, Long sBegin, Long sEnd, Long fBegin, Long fEnd, org.apache.hadoop.mapreduce.v2.api.records.JobState jobState)
          Look for a set of partial jobs.
 CharSequence getUser()
           
 void init(org.apache.hadoop.conf.Configuration conf)
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.apache.hadoop.yarn.service.AbstractService
getConfig, getName, getServiceState, getStartTime, register, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.mapreduce.v2.app.AppContext
getStartTime
 

Field Detail

CONF_FILENAME_REGEX

public static final Pattern CONF_FILENAME_REGEX

OLD_SUFFIX

public static final String OLD_SUFFIX
See Also:
Constant Field Values
Constructor Detail

JobHistory

public JobHistory()
Method Detail

init

public void init(org.apache.hadoop.conf.Configuration conf)
          throws org.apache.hadoop.yarn.YarnException
Specified by:
init in interface org.apache.hadoop.yarn.service.Service
Overrides:
init in class org.apache.hadoop.yarn.service.AbstractService
Throws:
org.apache.hadoop.yarn.YarnException

start

public void start()
Specified by:
start in interface org.apache.hadoop.yarn.service.Service
Overrides:
start in class org.apache.hadoop.yarn.service.AbstractService

stop

public void stop()
Specified by:
stop in interface org.apache.hadoop.yarn.service.Service
Overrides:
stop in class org.apache.hadoop.yarn.service.AbstractService

getApplicationName

public String getApplicationName()
Specified by:
getApplicationName in interface org.apache.hadoop.mapreduce.v2.app.AppContext

getJob

public org.apache.hadoop.mapreduce.v2.app.job.Job getJob(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId)
Specified by:
getJob in interface org.apache.hadoop.mapreduce.v2.app.AppContext

getAllJobs

public Map<org.apache.hadoop.mapreduce.v2.api.records.JobId,org.apache.hadoop.mapreduce.v2.app.job.Job> getAllJobs(org.apache.hadoop.yarn.api.records.ApplicationId appID)
Specified by:
getAllJobs in interface HistoryContext

getAllJobs

public Map<org.apache.hadoop.mapreduce.v2.api.records.JobId,org.apache.hadoop.mapreduce.v2.app.job.Job> getAllJobs()
Specified by:
getAllJobs in interface org.apache.hadoop.mapreduce.v2.app.AppContext

getPartialJobs

public JobsInfo getPartialJobs(Long offset,
                               Long count,
                               String user,
                               String queue,
                               Long sBegin,
                               Long sEnd,
                               Long fBegin,
                               Long fEnd,
                               org.apache.hadoop.mapreduce.v2.api.records.JobState jobState)
Look for a set of partial jobs.

Specified by:
getPartialJobs in interface HistoryContext
Parameters:
offset - the offset into the list of jobs.
count - the maximum number of jobs to return.
user - only return jobs for the given user.
queue - only return jobs for in the given queue.
sBegin - only return Jobs that started on or after the given time.
sEnd - only return Jobs that started on or before the given time.
fBegin - only return Jobs that ended on or after the given time.
fEnd - only return Jobs that ended on or before the given time.
jobState - only return jobs that are in the give job state.
Returns:
The list of filtered jobs.

getApplicationAttemptId

public org.apache.hadoop.yarn.api.records.ApplicationAttemptId getApplicationAttemptId()
Specified by:
getApplicationAttemptId in interface org.apache.hadoop.mapreduce.v2.app.AppContext

getApplicationID

public org.apache.hadoop.yarn.api.records.ApplicationId getApplicationID()
Specified by:
getApplicationID in interface org.apache.hadoop.mapreduce.v2.app.AppContext

getEventHandler

public org.apache.hadoop.yarn.event.EventHandler getEventHandler()
Specified by:
getEventHandler in interface org.apache.hadoop.mapreduce.v2.app.AppContext

getUser

public CharSequence getUser()
Specified by:
getUser in interface org.apache.hadoop.mapreduce.v2.app.AppContext

getClock

public org.apache.hadoop.yarn.Clock getClock()
Specified by:
getClock in interface org.apache.hadoop.mapreduce.v2.app.AppContext

getClusterInfo

public org.apache.hadoop.yarn.ClusterInfo getClusterInfo()
Specified by:
getClusterInfo in interface org.apache.hadoop.mapreduce.v2.app.AppContext


Copyright © 2013 Apache Software Foundation. All Rights Reserved.