public class CachedHistoryStorage extends org.apache.hadoop.service.AbstractService implements HistoryStorage
Constructor and Description |
---|
CachedHistoryStorage() |
Modifier and Type | Method and Description |
---|---|
Map<org.apache.hadoop.mapreduce.v2.api.records.JobId,org.apache.hadoop.mapreduce.v2.app.job.Job> |
getAllPartialJobs()
Get all of the cached jobs.
|
org.apache.hadoop.mapreduce.v2.app.job.Job |
getFullJob(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId)
Get a fully parsed job.
|
int |
getLoadedTasksCacheSize() |
static JobsInfo |
getPartialJobs(Collection<org.apache.hadoop.mapreduce.v2.app.job.Job> jobs,
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) |
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.
|
boolean |
getUseLoadedTasksCache() |
void |
refreshLoadedJobCache() |
void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
void |
setHistoryFileManager(HistoryFileManager hsManager)
Give the Storage a reference to a class that can be used to interact with
history files.
|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceStart, serviceStop, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
public void setHistoryFileManager(HistoryFileManager hsManager)
HistoryStorage
setHistoryFileManager
in interface HistoryStorage
hsManager
- the class that is used to interact with history files.public void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
serviceInit
in class org.apache.hadoop.service.AbstractService
Exception
public void refreshLoadedJobCache()
public org.apache.hadoop.mapreduce.v2.app.job.Job getFullJob(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId)
HistoryStorage
getFullJob
in interface HistoryStorage
jobId
- the id of the jobpublic Map<org.apache.hadoop.mapreduce.v2.api.records.JobId,org.apache.hadoop.mapreduce.v2.app.job.Job> getAllPartialJobs()
HistoryStorage
getAllPartialJobs
in interface HistoryStorage
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)
HistoryStorage
getPartialJobs
in interface HistoryStorage
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 given job state.public static JobsInfo getPartialJobs(Collection<org.apache.hadoop.mapreduce.v2.app.job.Job> jobs, 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)
@VisibleForTesting public boolean getUseLoadedTasksCache()
@VisibleForTesting public int getLoadedTasksCacheSize()
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.