@NotThreadSafe public final class LoadDefinition extends AbstractVoidPlanDefinition<LoadConfig,ArrayList<LoadDefinition.LoadTask>>
Modifier and Type | Class and Description |
---|---|
static class |
LoadDefinition.LoadTask
A task representing loading a block into the memory of a worker.
|
Constructor and Description |
---|
LoadDefinition()
Constructs a new
LoadDefinition . |
Modifier and Type | Method and Description |
---|---|
Class<LoadConfig> |
getJobConfigClass() |
SerializableVoid |
runTask(LoadConfig config,
ArrayList<LoadDefinition.LoadTask> tasks,
RunTaskContext context)
Runs the task in the executor.
|
Set<Pair<WorkerInfo,ArrayList<LoadDefinition.LoadTask>>> |
selectExecutors(LoadConfig config,
List<WorkerInfo> jobWorkerInfoList,
SelectExecutorsContext context)
Selects the workers to run the task.
|
join
public LoadDefinition()
LoadDefinition
.public Set<Pair<WorkerInfo,ArrayList<LoadDefinition.LoadTask>>> selectExecutors(LoadConfig 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(LoadConfig config, ArrayList<LoadDefinition.LoadTask> tasks, RunTaskContext context) throws Exception
PlanDefinition
config
- the job configurationtasks
- the arguments passed incontext
- the context containing information used to execute a taskException
- if any error occurspublic Class<LoadConfig> getJobConfigClass()
JobConfig
Copyright © 2023. All Rights Reserved.