public abstract class BenchWorker extends java.lang.Object implements Twister2Worker
Modifier and Type | Class and Description |
---|---|
protected class |
BenchWorker.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 |
---|
BenchWorker() |
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 int[] |
generateData() |
protected abstract boolean |
isDone() |
protected void |
progress() |
protected abstract boolean |
progressCommunication() |
protected abstract boolean |
sendMessages(int task,
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 abstract boolean progressCommunication()
protected abstract boolean isDone()
protected abstract boolean sendMessages(int task, java.lang.Object data, int flag)
public void close()
protected void finishCommunication(int src)
protected int[] generateData()
protected void verifyResults(ResultsVerifier resultsVerifier, java.lang.Object results, java.util.Map<java.lang.String,java.lang.Object> args)