Class JobHistory
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.mapreduce.v2.hs.JobHistory
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.mapreduce.v2.app.AppContext,HistoryContext,org.apache.hadoop.service.Service
Loads and manages the Job history cache.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.hadoop.conf.Configurationprotected HistoryFileManagerprotected HistoryStorageMap<org.apache.hadoop.mapreduce.v2.api.records.JobId,org.apache.hadoop.mapreduce.v2.app.job.Job> 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.ApplicationAttemptIdorg.apache.hadoop.yarn.api.records.ApplicationIdlongorg.apache.hadoop.yarn.security.client.ClientToAMTokenSecretManagerorg.apache.hadoop.yarn.util.ClockgetClock()org.apache.hadoop.mapreduce.v2.app.ClusterInfoorg.apache.hadoop.yarn.event.EventHandler<org.apache.hadoop.yarn.event.Event>protected intorg.apache.hadoop.mapreduce.v2.app.job.JobgetJob(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId) 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.org.apache.hadoop.mapreduce.v2.app.TaskAttemptFinishingMonitorgetUser()booleanbooleanvoidvoidprotected voidserviceInit(org.apache.hadoop.conf.Configuration conf) protected voidprotected voidvoidsetHistoryUrl(String historyUrl) 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, waitForServiceToStopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.mapreduce.v2.app.AppContext
getStartTime
-
Field Details
-
CONF_FILENAME_REGEX
-
OLD_SUFFIX
- See Also:
-
-
Constructor Details
-
JobHistory
public JobHistory()
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
createHistoryStorage
-
createHistoryFileManager
-
serviceStart
- Overrides:
serviceStartin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
getInitDelaySecs
protected int getInitDelaySecs() -
serviceStop
- Overrides:
serviceStopin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
getApplicationName
- Specified by:
getApplicationNamein interfaceorg.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:
getJobin interfaceorg.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:
getAllJobsin interfaceHistoryContext
-
getAllJobs
public Map<org.apache.hadoop.mapreduce.v2.api.records.JobId,org.apache.hadoop.mapreduce.v2.app.job.Job> getAllJobs()- Specified by:
getAllJobsin interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-
refreshLoadedJobCache
public void refreshLoadedJobCache() -
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:
getPartialJobsin interfaceHistoryContext- 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.
-
refreshJobRetentionSettings
public void refreshJobRetentionSettings() -
createConf
protected org.apache.hadoop.conf.Configuration createConf() -
getCleanerInterval
public long getCleanerInterval() -
getApplicationAttemptId
public org.apache.hadoop.yarn.api.records.ApplicationAttemptId getApplicationAttemptId()- Specified by:
getApplicationAttemptIdin interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-
getApplicationID
public org.apache.hadoop.yarn.api.records.ApplicationId getApplicationID()- Specified by:
getApplicationIDin interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-
getEventHandler
public org.apache.hadoop.yarn.event.EventHandler<org.apache.hadoop.yarn.event.Event> getEventHandler()- Specified by:
getEventHandlerin interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-
getUser
- Specified by:
getUserin interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-
getClock
public org.apache.hadoop.yarn.util.Clock getClock()- Specified by:
getClockin interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-
getClusterInfo
public org.apache.hadoop.mapreduce.v2.app.ClusterInfo getClusterInfo()- Specified by:
getClusterInfoin interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-
getBlacklistedNodes
- Specified by:
getBlacklistedNodesin interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-
getClientToAMTokenSecretManager
public org.apache.hadoop.yarn.security.client.ClientToAMTokenSecretManager getClientToAMTokenSecretManager()- Specified by:
getClientToAMTokenSecretManagerin interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-
isLastAMRetry
public boolean isLastAMRetry()- Specified by:
isLastAMRetryin interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-
hasSuccessfullyUnregistered
public boolean hasSuccessfullyUnregistered()- Specified by:
hasSuccessfullyUnregisteredin interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-
getNMHostname
- Specified by:
getNMHostnamein interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-
getTaskAttemptFinishingMonitor
public org.apache.hadoop.mapreduce.v2.app.TaskAttemptFinishingMonitor getTaskAttemptFinishingMonitor()- Specified by:
getTaskAttemptFinishingMonitorin interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-
getHistoryUrl
- Specified by:
getHistoryUrlin interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-
setHistoryUrl
- Specified by:
setHistoryUrlin interfaceorg.apache.hadoop.mapreduce.v2.app.AppContext
-