@ThreadSafe public class JobMaster extends AbstractMaster implements NoopJournaled
mClock, mMasterContext| Constructor and Description |
|---|
JobMaster(MasterContext masterContext,
FileSystem filesystem,
FileSystemContext fsContext,
UfsManager ufsManager)
Creates a new instance of
JobMaster. |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(long jobId)
Cancels a job.
|
java.util.List<JobInfo> |
failed(int limit,
long before,
long after) |
java.util.List<JobWorkerHealth> |
getAllWorkerHealth() |
java.lang.String |
getName() |
long |
getNewJobId() |
java.util.Map<ServiceType,GrpcService> |
getServices() |
JobInfo |
getStatus(long jobId)
Gets information of the given job id (verbose = True).
|
JobInfo |
getStatus(long jobId,
boolean verbose)
Gets information of the given job id.
|
JobServiceSummary |
getSummary()
Gets summary of the job service.
|
java.util.List<WorkerInfo> |
getWorkerInfoList() |
java.util.List<java.lang.Long> |
list(ListAllPOptions options) |
java.util.List<JobInfo> |
listDetailed() |
long |
registerWorker(WorkerNetAddress workerNetAddress)
Returns a worker id for the given worker.
|
long |
run(JobConfig jobConfig)
Runs a job with the given configuration.
|
void |
run(JobConfig jobConfig,
long jobId)
Runs a job with the given configuration and job id.
|
void |
setTaskPoolSize(int taskPoolSize) |
void |
start(java.lang.Boolean isLeader) |
void |
stop() |
java.util.List<JobCommand> |
workerHeartbeat(JobWorkerHealth jobWorkerHealth,
java.util.List<TaskInfo> taskInfoList)
Updates the tasks' status when a worker periodically heartbeats with the master, and sends the
commands for the worker to execute.
|
close, createJournalContext, getDependencies, getExecutorService, getMasterContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCheckpointName, getJournalEntryIterator, processJournalEntry, resetState, restoreFromCheckpoint, writeToCheckpointapplyAndJournalpublic JobMaster(MasterContext masterContext, FileSystem filesystem, FileSystemContext fsContext, UfsManager ufsManager)
JobMaster.masterContext - the context for Alluxio masterfilesystem - the Alluxio filesystem client the job master uses to communicatefsContext - the filesystem client's underlying contextufsManager - the ufs managerpublic long getNewJobId()
public void start(java.lang.Boolean isLeader)
throws java.io.IOException
start in interface Server<java.lang.Boolean>start in class AbstractMasterjava.io.IOExceptionpublic void stop()
throws java.io.IOException
stop in interface Server<java.lang.Boolean>stop in class AbstractMasterjava.io.IOExceptionpublic java.util.Map<ServiceType,GrpcService> getServices()
getServices in interface Server<java.lang.Boolean>public java.lang.String getName()
public long run(JobConfig jobConfig) throws JobDoesNotExistException, ResourceExhaustedException
jobConfig - the job configurationJobDoesNotExistException - when the job doesn't existResourceExhaustedException - if the job master is too busy to run the jobpublic void run(JobConfig jobConfig, long jobId) throws JobDoesNotExistException, ResourceExhaustedException
jobConfig - the job configurationjobId - the job idJobDoesNotExistException - when the job doesn't existResourceExhaustedException - if the job master is too busy to run the jobpublic void cancel(long jobId)
throws JobDoesNotExistException
jobId - the id of the jobJobDoesNotExistException - when the job does not existpublic java.util.List<java.lang.Long> list(ListAllPOptions options)
options - listing optionspublic java.util.List<JobInfo> listDetailed()
public java.util.List<JobInfo> failed(int limit, long before, long after)
limit - maximum number of jobInfos to returnbefore - filters out on or after this timestamp (in ms) (-1 to disable)after - filter out on or before this timestamp (in ms) (-1 to disable)public JobInfo getStatus(long jobId) throws JobDoesNotExistException
jobId - the id of the jobJobDoesNotExistException - if the job does not existpublic JobInfo getStatus(long jobId, boolean verbose) throws JobDoesNotExistException
jobId - the id of the jobverbose - whether the job info should be verboseJobDoesNotExistException - if the job does not existpublic JobServiceSummary getSummary()
JobServiceSummarypublic java.util.List<JobWorkerHealth> getAllWorkerHealth()
public long registerWorker(WorkerNetAddress workerNetAddress)
workerNetAddress - the worker WorkerNetAddresspublic java.util.List<WorkerInfo> getWorkerInfoList()
WorkerInfo objects representing the workers in Alluxiopublic void setTaskPoolSize(int taskPoolSize)
taskPoolSize - the task pool size for the job workerspublic java.util.List<JobCommand> workerHeartbeat(JobWorkerHealth jobWorkerHealth, java.util.List<TaskInfo> taskInfoList) throws ResourceExhaustedException
jobWorkerHealth - the job worker health infotaskInfoList - the list of the task informationJobCommand to the workerResourceExhaustedExceptionCopyright © 2022. All Rights Reserved.