Package org.apache.hadoop.util
Class ReadWriteDiskValidatorMetrics
java.lang.Object
org.apache.hadoop.util.ReadWriteDiskValidatorMetrics
The metrics for a directory generated by
ReadWriteDiskValidator.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Map<String,ReadWriteDiskValidatorMetrics> Simple metrics cache to help prevent re-registrations and help to access metrics. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddReadFileLatency(long readLatency) Add the file read latency toMutableQuantilesmetrics.voidaddWriteFileLatency(long writeLatency) Add the file write latency toMutableQuantilesmetrics.voidIncrease the failure count and update the last failure timestamp.protected MutableQuantiles[]GetMutableQuantilesmetrics for the file read time.protected MutableQuantiles[]GetMutableQuantilesmetrics for the file write time.Get a metric by given directory name.protected static StringsourceName(String dirName) Get a source name by given directory name.
-
Field Details
-
DIR_METRICS
Simple metrics cache to help prevent re-registrations and help to access metrics.
-
-
Constructor Details
-
ReadWriteDiskValidatorMetrics
public ReadWriteDiskValidatorMetrics()
-
-
Method Details
-
getMetric
Get a metric by given directory name.- Parameters:
dirName- directory name- Returns:
- the metric
-
addWriteFileLatency
public void addWriteFileLatency(long writeLatency) Add the file write latency toMutableQuantilesmetrics.- Parameters:
writeLatency- file write latency in microseconds
-
addReadFileLatency
public void addReadFileLatency(long readLatency) Add the file read latency toMutableQuantilesmetrics.- Parameters:
readLatency- file read latency in microseconds
-
sourceName
Get a source name by given directory name.- Parameters:
dirName- directory name- Returns:
- the source name
-
diskCheckFailed
public void diskCheckFailed()Increase the failure count and update the last failure timestamp. -
getFileReadQuantiles
GetMutableQuantilesmetrics for the file read time.- Returns:
MutableQuantilesmetrics for the file read time
-
getFileWriteQuantiles
GetMutableQuantilesmetrics for the file write time.- Returns:
MutableQuantilesmetrics for the file write time
-