T - the job configurationP - the parameters to pass to each taskR - the return type from the taskpublic interface PlanDefinition<T extends JobConfig,P extends java.io.Serializable,R extends java.io.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 |
|---|---|
java.lang.Class<T> |
getJobConfigClass() |
java.lang.String |
join(T config,
java.util.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.
|
java.util.Set<Pair<WorkerInfo,P>> |
selectExecutors(T config,
java.util.List<WorkerInfo> jobWorkerInfoList,
SelectExecutorsContext selectExecutorsContext)
Selects the workers to run the task.
|
java.lang.Class<T> getJobConfigClass()
JobConfigjava.util.Set<Pair<WorkerInfo,P>> selectExecutors(T config, java.util.List<WorkerInfo> jobWorkerInfoList, SelectExecutorsContext selectExecutorsContext) throws java.lang.Exception
config - the job configurationjobWorkerInfoList - the list of available workers' informationselectExecutorsContext - the context containing information used to select executorsjava.lang.Exception - if any error occursR runTask(T config, P args, RunTaskContext runTaskContext) throws java.lang.Exception
config - the job configurationargs - the arguments passed inrunTaskContext - the context containing information used to execute a taskjava.lang.Exception - if any error occursjava.lang.String join(T config, java.util.Map<WorkerInfo,R> taskResults) throws java.lang.Exception
config - the job configurationtaskResults - the task resultsjava.lang.Exception - if any error occursCopyright © 2022. All Rights Reserved.