@NotThreadSafe public final class LoadDefinition extends AbstractVoidJobDefinition<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.
|
Map<WorkerInfo,ArrayList<LoadDefinition.LoadTask>> |
selectExecutors(LoadConfig config,
List<WorkerInfo> jobWorkerInfoList,
SelectExecutorsContext context)
Selects the workers to run the task.
|
join
public LoadDefinition()
LoadDefinition
.public Map<WorkerInfo,ArrayList<LoadDefinition.LoadTask>> selectExecutors(LoadConfig config, List<WorkerInfo> jobWorkerInfoList, SelectExecutorsContext context) throws Exception
JobDefinition
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
JobDefinition
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.