Package alluxio.stress.worker
Class IOTaskResult
- java.lang.Object
-
- alluxio.stress.worker.IOTaskResult
-
- All Implemented Interfaces:
TaskResult,alluxio.util.JsonSerializable
public class IOTaskResult extends java.lang.Object implements TaskResult
Task result for the UFS I/O test.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIOTaskResult.IOModeThe IO mode, either READ or WRITE.static classIOTaskResult.PointAn object representation of a successful I/O operation to the UFS.
-
Constructor Summary
Constructors Constructor Description IOTaskResult()An empty constructor.IOTaskResult(java.util.List<IOTaskResult.Point> points, java.util.List<java.lang.String> errors)The constructor used for serialization.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddError(java.lang.String errorMsg)voidaddPoint(IOTaskResult.Point p)TaskResult.Aggregatoraggregator()BaseParametersgetBaseParameters()java.util.List<java.lang.String>getErrors()UfsIOParametersgetParameters()java.util.List<IOTaskResult.Point>getPoints()IOTaskResultmerge(IOTaskResult anotherResult)Merge another result into itself.static IOTaskResultreduceList(java.lang.Iterable<IOTaskResult> results)Reduce a list ofIOTaskResultinto one.voidsetBaseParameters(BaseParameters baseParameters)voidsetErrors(java.util.List<java.lang.String> errors)voidsetParameters(UfsIOParameters parameters)voidsetPoints(java.util.List<IOTaskResult.Point> points)java.lang.StringtoString()
-
-
-
Constructor Detail
-
IOTaskResult
public IOTaskResult()
An empty constructor.
-
IOTaskResult
public IOTaskResult(java.util.List<IOTaskResult.Point> points, java.util.List<java.lang.String> errors)
The constructor used for serialization.- Parameters:
points- the pointserrors- the errors
-
-
Method Detail
-
addPoint
public void addPoint(IOTaskResult.Point p)
- Parameters:
p- the point to add
-
getPoints
public java.util.List<IOTaskResult.Point> getPoints()
- Returns:
- the points
-
addError
public void addError(java.lang.String errorMsg)
- Parameters:
errorMsg- an error msg to add
-
getErrors
public java.util.List<java.lang.String> getErrors()
- Returns:
- all the error messages
-
setErrors
public void setErrors(java.util.List<java.lang.String> errors)
- Parameters:
errors- the errors
-
setPoints
public void setPoints(java.util.List<IOTaskResult.Point> points)
- Parameters:
points- the points
-
getBaseParameters
public BaseParameters getBaseParameters()
- Returns:
- the
BaseParameters
-
setBaseParameters
public void setBaseParameters(BaseParameters baseParameters)
- Parameters:
baseParameters- theBaseParametersto use
-
getParameters
public UfsIOParameters getParameters()
- Returns:
- the
UfsIOParameters
-
setParameters
public void setParameters(UfsIOParameters parameters)
- Parameters:
parameters- theUfsIOParametersto use
-
merge
public IOTaskResult merge(IOTaskResult anotherResult)
Merge another result into itself. Combine all the numbers.- Parameters:
anotherResult- anotherIOTaskResult- Returns:
- self
-
reduceList
public static IOTaskResult reduceList(java.lang.Iterable<IOTaskResult> results)
Reduce a list ofIOTaskResultinto one.- Parameters:
results- a list of results to combine- Returns:
- the combined result
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
aggregator
public TaskResult.Aggregator aggregator()
- Specified by:
aggregatorin interfaceTaskResult- Returns:
- the aggregator that can produce a summary
-
-