Package alluxio.stress.master
Class MasterBenchTaskResultBase<P extends MasterBenchBaseParameters>
- java.lang.Object
-
- alluxio.stress.master.MasterBenchTaskResultBase<P>
-
- Type Parameters:
P- the type of task parameter
- All Implemented Interfaces:
TaskResult,alluxio.util.JsonSerializable
- Direct Known Subclasses:
MasterBenchTaskResult,MultiOperationMasterBenchTaskResult
public abstract class MasterBenchTaskResultBase<P extends MasterBenchBaseParameters> extends java.lang.Object implements TaskResult
The task result for the master stress tests.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface alluxio.stress.TaskResult
TaskResult.Aggregator<T extends TaskResult>
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseParametersmBaseParametersprotected longmDurationMsprotected longmEndMsprotected java.util.List<java.lang.String>mErrorsprotected PmParametersprotected longmRecordStartMs
-
Constructor Summary
Constructors Constructor Description MasterBenchTaskResultBase()Creates an instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddErrorMessage(java.lang.String errMesssage)voidaggregateByWorker(MasterBenchTaskResultBase<P> result)Merges (updates) a task result with this result except the error information.BaseParametersgetBaseParameters()longgetDurationMs()longgetEndMs()java.util.List<java.lang.String>getErrors()PgetParameters()longgetRecordStartMs()voidmerge(MasterBenchTaskResultBase<P> result)Merges (updates) a task result with this result.abstract voidputStatisticsForMethod(java.lang.String method, MasterBenchTaskResultStatistics statistics)voidsetBaseParameters(BaseParameters baseParameters)voidsetDurationMs(long durationMs)voidsetEndMs(long endMs)voidsetErrors(java.util.List<java.lang.String> errors)voidsetParameters(P parameters)voidsetRecordStartMs(long recordStartMs)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface alluxio.stress.TaskResult
aggregator
-
-
-
-
Field Detail
-
mRecordStartMs
protected long mRecordStartMs
-
mEndMs
protected long mEndMs
-
mDurationMs
protected long mDurationMs
-
mBaseParameters
protected BaseParameters mBaseParameters
-
mParameters
protected P extends MasterBenchBaseParameters mParameters
-
mErrors
protected java.util.List<java.lang.String> mErrors
-
-
Method Detail
-
merge
public void merge(MasterBenchTaskResultBase<P> result) throws java.lang.Exception
Merges (updates) a task result with this result.- Parameters:
result- the task result to merge- Throws:
java.lang.Exception
-
putStatisticsForMethod
public abstract void putStatisticsForMethod(java.lang.String method, MasterBenchTaskResultStatistics statistics)- Parameters:
method- the name of the method to insert statistics forstatistics- the statistics for the method
-
aggregateByWorker
public void aggregateByWorker(MasterBenchTaskResultBase<P> result) throws java.lang.Exception
Merges (updates) a task result with this result except the error information.- Parameters:
result- the task result to merge- Throws:
java.lang.Exception
-
getDurationMs
public long getDurationMs()
- Returns:
- the duration (in ms)
-
setDurationMs
public void setDurationMs(long durationMs)
- Parameters:
durationMs- the duration (in ms)
-
getBaseParameters
public BaseParameters getBaseParameters()
- Specified by:
getBaseParametersin interfaceTaskResult- Returns:
- the base parameters of the result
-
setBaseParameters
public void setBaseParameters(BaseParameters baseParameters)
- Parameters:
baseParameters- the base parameters
-
getParameters
public P getParameters()
- Returns:
- the parameters
-
setParameters
public void setParameters(P parameters)
- Parameters:
parameters- the parameters
-
getRecordStartMs
public long getRecordStartMs()
- Returns:
- the start time (in ms)
-
setRecordStartMs
public void setRecordStartMs(long recordStartMs)
- Parameters:
recordStartMs- the start time (in ms)
-
getEndMs
public long getEndMs()
- Returns:
- the end time (in ms)
-
setEndMs
public void setEndMs(long endMs)
- Parameters:
endMs- the end time (in ms)
-
getErrors
public java.util.List<java.lang.String> getErrors()
- Specified by:
getErrorsin interfaceTaskResult- Returns:
- the list of errors in the result
-
setErrors
public void setErrors(java.util.List<java.lang.String> errors)
- Parameters:
errors- the list of errors
-
addErrorMessage
public void addErrorMessage(java.lang.String errMesssage)
- Parameters:
errMesssage- the error message to add
-
-