Package org.apache.hadoop.fs.statistics
Class DurationStatisticSummary
java.lang.Object
org.apache.hadoop.fs.statistics.DurationStatisticSummary
- All Implemented Interfaces:
Serializable
@Public
@Unstable
public final class DurationStatisticSummary
extends Object
implements Serializable
Summary of duration tracking statistics
as extracted from an IOStatistics instance.
This is for reporting and testing.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDurationStatisticSummary(String key, boolean success, long count, long max, long min, MeanStatistic mean) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic DurationStatisticSummaryfetchDurationSummary(IOStatistics source, String key, boolean success) Fetch the duration timing summary of success or failure operations from an IO Statistics source.static DurationStatisticSummaryfetchSuccessSummary(IOStatistics source, String key) Fetch the duration timing summary from an IOStatistics source.longgetCount()getKey()longgetMax()getMean()longgetMin()booleantoString()
-
Constructor Details
-
DurationStatisticSummary
public DurationStatisticSummary(String key, boolean success, long count, long max, long min, @Nullable MeanStatistic mean) Constructor.- Parameters:
key- Statistic key.success- Are these success or failure statistics.count- Count of operation invocations.max- Max duration; -1 if unknown.min- Min duration; -1 if unknown.mean- Mean duration -may be null. (will be cloned)
-
-
Method Details
-
getKey
-
isSuccess
public boolean isSuccess() -
getCount
public long getCount() -
getMax
public long getMax() -
getMin
public long getMin() -
getMean
-
toString
-
fetchDurationSummary
public static DurationStatisticSummary fetchDurationSummary(IOStatistics source, String key, boolean success) Fetch the duration timing summary of success or failure operations from an IO Statistics source. If the duration key is unknown, the summary will be incomplete.- Parameters:
source- source of datakey- duration statistic keysuccess- fetch success statistics, or if false, failure stats.- Returns:
- a summary of the statistics.
-
fetchSuccessSummary
Fetch the duration timing summary from an IOStatistics source. If the duration key is unknown, the summary will be incomplete.- Parameters:
source- source of datakey- duration statistic key- Returns:
- a summary of the statistics.
-