T
- the job configurationP
- the parameters to pass to each taskR
- the return type from the taskpublic interface JobDefinition<T extends JobConfig,P extends Serializable,R extends Serializable>
selectExecutors(JobConfig, List, SelectExecutorsContext)
method runs at the
master node and selects the workers to run the executors. (2) a
runTask(JobConfig, Serializable, RunTaskContext)
method runs at each selected executor
on the worker node.Modifier and Type | Method and Description |
---|---|
Class<T> |
getJobConfigClass() |
String |
join(T config,
Map<WorkerInfo,R> taskResults)
Joins the task results on the master.
|
R |
runTask(T config,
P args,
RunTaskContext runTaskContext)
Runs the task in the executor.
|
Map<WorkerInfo,P> |
selectExecutors(T config,
List<WorkerInfo> jobWorkerInfoList,
SelectExecutorsContext selectExecutorsContext)
Selects the workers to run the task.
|
Map<WorkerInfo,P> selectExecutors(T config, List<WorkerInfo> jobWorkerInfoList, SelectExecutorsContext selectExecutorsContext) throws Exception
config
- the job configurationjobWorkerInfoList
- the list of available workers' informationselectExecutorsContext
- the context containing information used to select executorsException
- if any error occursR runTask(T config, P args, RunTaskContext runTaskContext) throws Exception
config
- the job configurationargs
- the arguments passed inrunTaskContext
- the context containing information used to execute a taskException
- if any error occursCopyright © 2023. All Rights Reserved.