public abstract class KeyedBenchWorker extends java.lang.Object implements Twister2Worker
Modifier and Type | Class and Description |
---|---|
protected class |
KeyedBenchWorker.MapWorker |
Modifier and Type | Field and Description |
---|---|
protected ExperimentData |
experimentData |
protected java.util.Map<java.lang.Integer,java.lang.Boolean> |
finishedSources |
protected int[] |
inputDataArray |
protected JobParameters |
jobParameters |
protected LogicalPlan |
logicalPlan |
protected BenchmarkResultsRecorder |
resultsRecorder |
protected boolean |
sourcesDone |
protected int |
workerId |
Constructor and Description |
---|
KeyedBenchWorker() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected abstract void |
compute(WorkerEnvironment wEnv) |
void |
execute(WorkerEnvironment workerEnvironment)
This is the main point of entry for Twister2 jobs.
|
protected void |
finishCommunication(int src) |
protected abstract boolean |
isDone() |
protected void |
progress() |
protected abstract boolean |
progressCommunication() |
protected abstract boolean |
sendMessages(int task,
java.lang.Object key,
java.lang.Object data,
int flag) |
protected void |
verifyResults(ResultsVerifier resultsVerifier,
java.lang.Object results,
java.util.Map<java.lang.String,java.lang.Object> args)
This method will verify results and append the output to the results recorder
|
protected int workerId
protected LogicalPlan logicalPlan
protected JobParameters jobParameters
protected final java.util.Map<java.lang.Integer,java.lang.Boolean> finishedSources
protected boolean sourcesDone
protected ExperimentData experimentData
protected int[] inputDataArray
protected BenchmarkResultsRecorder resultsRecorder
public void execute(WorkerEnvironment workerEnvironment)
Twister2Worker
execute
in interface Twister2Worker
protected abstract void compute(WorkerEnvironment wEnv)
protected void progress()
protected void verifyResults(ResultsVerifier resultsVerifier, java.lang.Object results, java.util.Map<java.lang.String,java.lang.Object> args)
public void close()
protected abstract boolean progressCommunication()
protected abstract boolean isDone()
protected abstract boolean sendMessages(int task, java.lang.Object key, java.lang.Object data, int flag)
protected void finishCommunication(int src)