@NotThreadSafe public final class LoadDefinition extends AbstractVoidPlanDefinition<LoadConfig,java.util.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 |
|---|---|
java.lang.Class<LoadConfig> |
getJobConfigClass() |
SerializableVoid |
runTask(LoadConfig config,
java.util.ArrayList<LoadDefinition.LoadTask> tasks,
RunTaskContext context)
Runs the task in the executor.
|
java.util.Set<Pair<WorkerInfo,java.util.ArrayList<LoadDefinition.LoadTask>>> |
selectExecutors(LoadConfig config,
java.util.List<WorkerInfo> jobWorkerInfoList,
SelectExecutorsContext context)
Selects the workers to run the task.
|
joinpublic LoadDefinition()
LoadDefinition.public java.util.Set<Pair<WorkerInfo,java.util.ArrayList<LoadDefinition.LoadTask>>> selectExecutors(LoadConfig config, java.util.List<WorkerInfo> jobWorkerInfoList, SelectExecutorsContext context) throws java.lang.Exception
PlanDefinitionconfig - the job configurationjobWorkerInfoList - the list of available workers' informationcontext - the context containing information used to select executorsjava.lang.Exception - if any error occurspublic SerializableVoid runTask(LoadConfig config, java.util.ArrayList<LoadDefinition.LoadTask> tasks, RunTaskContext context) throws java.lang.Exception
PlanDefinitionconfig - the job configurationtasks - the arguments passed incontext - the context containing information used to execute a taskjava.lang.Exception - if any error occurspublic java.lang.Class<LoadConfig> getJobConfigClass()
JobConfigCopyright © 2022. All Rights Reserved.