org.apache.hadoop.mapreduce.v2.hs
Class JobHistory
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.mapreduce.v2.hs.JobHistory
- All Implemented Interfaces:
- Closeable, org.apache.hadoop.mapreduce.v2.app.AppContext, HistoryContext, org.apache.hadoop.service.Service
public class JobHistory
- extends org.apache.hadoop.service.AbstractService
- implements HistoryContext
Loads and manages the Job history cache.
| Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service |
org.apache.hadoop.service.Service.STATE |
|
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()
|
Set<String> |
getBlacklistedNodes()
|
org.apache.hadoop.yarn.security.client.ClientToAMTokenSecretManager |
getClientToAMTokenSecretManager()
|
org.apache.hadoop.yarn.util.Clock |
getClock()
|
org.apache.hadoop.mapreduce.v2.app.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()
|
boolean |
hasSuccessfullyUnregistered()
|
boolean |
isLastAMRetry()
|
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf)
|
protected void |
serviceStart()
|
protected void |
serviceStop()
|
| Methods inherited from class org.apache.hadoop.service.AbstractService |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop |
| Methods inherited from interface org.apache.hadoop.mapreduce.v2.app.AppContext |
getStartTime |
CONF_FILENAME_REGEX
public static final Pattern CONF_FILENAME_REGEX
OLD_SUFFIX
public static final String OLD_SUFFIX
- See Also:
- Constant Field Values
JobHistory
public JobHistory()
serviceInit
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
- Overrides:
serviceInit in class org.apache.hadoop.service.AbstractService
- Throws:
Exception
serviceStart
protected void serviceStart()
throws Exception
- Overrides:
serviceStart in class org.apache.hadoop.service.AbstractService
- Throws:
Exception
serviceStop
protected void serviceStop()
throws Exception
- Overrides:
serviceStop in class org.apache.hadoop.service.AbstractService
- Throws:
Exception
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.util.Clock getClock()
- Specified by:
getClock in interface org.apache.hadoop.mapreduce.v2.app.AppContext
getClusterInfo
public org.apache.hadoop.mapreduce.v2.app.ClusterInfo getClusterInfo()
- Specified by:
getClusterInfo in interface org.apache.hadoop.mapreduce.v2.app.AppContext
getBlacklistedNodes
public Set<String> getBlacklistedNodes()
- Specified by:
getBlacklistedNodes in interface org.apache.hadoop.mapreduce.v2.app.AppContext
getClientToAMTokenSecretManager
public org.apache.hadoop.yarn.security.client.ClientToAMTokenSecretManager getClientToAMTokenSecretManager()
- Specified by:
getClientToAMTokenSecretManager in interface org.apache.hadoop.mapreduce.v2.app.AppContext
isLastAMRetry
public boolean isLastAMRetry()
- Specified by:
isLastAMRetry in interface org.apache.hadoop.mapreduce.v2.app.AppContext
hasSuccessfullyUnregistered
public boolean hasSuccessfullyUnregistered()
- Specified by:
hasSuccessfullyUnregistered in interface org.apache.hadoop.mapreduce.v2.app.AppContext
Copyright © 2013 Apache Software Foundation. All Rights Reserved.