@NotThreadSafe public final class BatchedJobDefinition extends AbstractVoidPlanDefinition<BatchedJobConfig,BatchedJobDefinition.BatchedJobTask>
Modifier and Type | Class and Description |
---|---|
static class |
BatchedJobDefinition.BatchedJobTask
A task representing loading a block into the memory of a worker.
|
static class |
BatchedJobDefinition.JobDefinitionFactory
Factory class for get the specific job definition.
|
Constructor and Description |
---|
BatchedJobDefinition()
Constructs a new
BatchedJobDefinition . |
Modifier and Type | Method and Description |
---|---|
Class<BatchedJobConfig> |
getJobConfigClass() |
SerializableVoid |
runTask(BatchedJobConfig config,
BatchedJobDefinition.BatchedJobTask task,
RunTaskContext context)
Runs the task in the executor.
|
Set<Pair<WorkerInfo,BatchedJobDefinition.BatchedJobTask>> |
selectExecutors(BatchedJobConfig config,
List<WorkerInfo> jobWorkerInfoList,
SelectExecutorsContext context)
Selects the workers to run the task.
|
join
public BatchedJobDefinition()
BatchedJobDefinition
.public Set<Pair<WorkerInfo,BatchedJobDefinition.BatchedJobTask>> selectExecutors(BatchedJobConfig config, List<WorkerInfo> jobWorkerInfoList, SelectExecutorsContext context) throws Exception
PlanDefinition
config
- the job configurationjobWorkerInfoList
- the list of available workers' informationcontext
- the context containing information used to select executorsException
- if any error occurspublic SerializableVoid runTask(BatchedJobConfig config, BatchedJobDefinition.BatchedJobTask task, RunTaskContext context) throws Exception
PlanDefinition
config
- the job configurationtask
- the arguments passed incontext
- the context containing information used to execute a taskException
- if any error occurspublic Class<BatchedJobConfig> getJobConfigClass()
JobConfig
Copyright © 2023. All Rights Reserved.