@ThreadSafe public final 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.
|
String |
getName() |
Map<ServiceType,GrpcService> |
getServices() |
JobInfo |
getStatus(long jobId)
Gets information of the given job id.
|
JobServiceSummary |
getSummary()
Gets summary of the job service.
|
List<WorkerInfo> |
getWorkerInfoList() |
List<Long> |
list() |
long |
registerWorker(WorkerNetAddress workerNetAddress)
Returns a worker id for the given worker.
|
long |
run(JobConfig jobConfig)
Runs a job with the given configuration.
|
void |
start(Boolean isLeader)
Starts the Alluxio server.
|
List<JobCommand> |
workerHeartbeat(long workerId,
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, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCheckpointName, getJournalEntryIterator, processJournalEntry, resetState, restoreFromCheckpoint, writeToCheckpoint
applyAndJournal
public 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 void start(Boolean isLeader) throws IOException
Server
start
in interface Server<Boolean>
start
in class AbstractMaster
isLeader
- the start optionsIOException
public Map<ServiceType,GrpcService> getServices()
getServices
in interface Server<Boolean>
public 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 cancel(long jobId) throws JobDoesNotExistException
jobId
- the id of the jobJobDoesNotExistException
- when the job does not existpublic JobInfo getStatus(long jobId) throws JobDoesNotExistException
jobId
- the id of the jobJobDoesNotExistException
- if the job does not existpublic JobServiceSummary getSummary()
JobServiceSummary
public long registerWorker(WorkerNetAddress workerNetAddress)
workerNetAddress
- the worker WorkerNetAddress
public List<WorkerInfo> getWorkerInfoList()
WorkerInfo
objects representing the workers in Alluxiopublic List<JobCommand> workerHeartbeat(long workerId, List<TaskInfo> taskInfoList)
workerId
- the worker idtaskInfoList
- the list of the task informationJobCommand
to the workerCopyright © 2023. All Rights Reserved.