public final class StressBenchDefinition extends Object implements PlanDefinition<StressBenchConfig,ArrayList<String>,String>
StressBenchConfig
is the configuration class, each task takes a ListConstructor and Description |
---|
StressBenchDefinition()
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
Class<StressBenchConfig> |
getJobConfigClass() |
String |
join(StressBenchConfig config,
Map<WorkerInfo,String> taskResults)
Joins the task results on the master.
|
String |
runTask(StressBenchConfig config,
ArrayList<String> args,
RunTaskContext runTaskContext)
Runs the task in the executor.
|
Set<Pair<WorkerInfo,ArrayList<String>>> |
selectExecutors(StressBenchConfig config,
List<WorkerInfo> jobWorkerInfoList,
SelectExecutorsContext context)
Selects the workers to run the task.
|
public Class<StressBenchConfig> getJobConfigClass()
getJobConfigClass
in interface PlanDefinition<StressBenchConfig,ArrayList<String>,String>
JobConfig
public Set<Pair<WorkerInfo,ArrayList<String>>> selectExecutors(StressBenchConfig config, List<WorkerInfo> jobWorkerInfoList, SelectExecutorsContext context)
PlanDefinition
selectExecutors
in interface PlanDefinition<StressBenchConfig,ArrayList<String>,String>
config
- the job configurationjobWorkerInfoList
- the list of available workers' informationcontext
- the context containing information used to select executorspublic String runTask(StressBenchConfig config, ArrayList<String> args, RunTaskContext runTaskContext) throws Exception
PlanDefinition
runTask
in interface PlanDefinition<StressBenchConfig,ArrayList<String>,String>
config
- the job configurationargs
- the arguments passed inrunTaskContext
- the context containing information used to execute a taskException
- if any error occurspublic String join(StressBenchConfig config, Map<WorkerInfo,String> taskResults) throws Exception
PlanDefinition
join
in interface PlanDefinition<StressBenchConfig,ArrayList<String>,String>
config
- the job configurationtaskResults
- the task resultsException
- if any error occursCopyright © 2023. All Rights Reserved.