public class JobHistory extends AbstractService implements HistoryContext
Service.STATE| Modifier and Type | Field and Description |
|---|---|
static Pattern |
CONF_FILENAME_REGEX |
static String |
OLD_SUFFIX |
| Constructor and Description |
|---|
JobHistory() |
| Modifier and Type | Method and Description |
|---|---|
Map<JobId,Job> |
getAllJobs() |
Map<JobId,Job> |
getAllJobs(ApplicationId appID) |
ApplicationAttemptId |
getApplicationAttemptId() |
ApplicationId |
getApplicationID() |
String |
getApplicationName() |
Set<String> |
getBlacklistedNodes() |
ClientToAMTokenSecretManager |
getClientToAMTokenSecretManager() |
Clock |
getClock() |
ClusterInfo |
getClusterInfo() |
EventHandler |
getEventHandler() |
Job |
getJob(JobId jobId) |
JobsInfo |
getPartialJobs(Long offset,
Long count,
String user,
String queue,
Long sBegin,
Long sEnd,
Long fBegin,
Long fEnd,
JobState jobState)
Look for a set of partial jobs.
|
CharSequence |
getUser() |
boolean |
hasSuccessfullyUnregistered() |
boolean |
isLastAMRetry() |
protected void |
serviceInit(Configuration conf)
All initialization code needed by a service.
|
protected void |
serviceStart()
Actions called during the INITED to STARTED transition.
|
protected void |
serviceStop()
Actions called during the transition to the STOPPED state.
|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetStartTimepublic static final Pattern CONF_FILENAME_REGEX
public static final String OLD_SUFFIX
protected void serviceInit(Configuration conf) throws Exception
AbstractServiceAbstractService.init(Configuration) prevents re-entrancy.
The base implementation checks to see if the subclass has created
a new configuration instance, and if so, updates the base class valueserviceInit in class AbstractServiceconf - configurationException - on a failure -these will be caught,
possibly wrapped, and wil; trigger a service stopprotected void serviceStart()
throws Exception
AbstractServiceAbstractService.start() prevents re-entrancy.serviceStart in class AbstractServiceException - if needed -these will be caught,
wrapped, and trigger a service stopprotected void serviceStop()
throws Exception
AbstractServiceAbstractService.stop() prevents re-entrancy.
Implementations MUST write this to be robust against failures, including
checks for null references -and for the first failure to not stop other
attempts to shut down parts of the service.serviceStop in class AbstractServiceException - if needed -these will be caught and logged.public String getApplicationName()
getApplicationName in interface AppContextpublic Job getJob(JobId jobId)
getJob in interface AppContextpublic Map<JobId,Job> getAllJobs(ApplicationId appID)
getAllJobs in interface HistoryContextpublic Map<JobId,Job> getAllJobs()
getAllJobs in interface AppContextpublic JobsInfo getPartialJobs(Long offset, Long count, String user, String queue, Long sBegin, Long sEnd, Long fBegin, Long fEnd, JobState jobState)
getPartialJobs in interface HistoryContextoffset - 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.public ApplicationAttemptId getApplicationAttemptId()
getApplicationAttemptId in interface AppContextpublic ApplicationId getApplicationID()
getApplicationID in interface AppContextpublic EventHandler getEventHandler()
getEventHandler in interface AppContextpublic CharSequence getUser()
getUser in interface AppContextpublic Clock getClock()
getClock in interface AppContextpublic ClusterInfo getClusterInfo()
getClusterInfo in interface AppContextpublic Set<String> getBlacklistedNodes()
getBlacklistedNodes in interface AppContextpublic ClientToAMTokenSecretManager getClientToAMTokenSecretManager()
getClientToAMTokenSecretManager in interface AppContextpublic boolean isLastAMRetry()
isLastAMRetry in interface AppContextpublic boolean hasSuccessfullyUnregistered()
hasSuccessfullyUnregistered in interface AppContextCopyright © 2013 Apache Software Foundation. All rights reserved.