AbfsCounters, org.apache.hadoop.fs.statistics.DurationTrackerFactory, org.apache.hadoop.fs.statistics.IOStatisticsSourcepublic class AbfsCountersImpl extends java.lang.Object implements AbfsCounters
| Constructor | Description |
|---|---|
AbfsCountersImpl(java.net.URI uri) |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
formString(java.lang.String prefix,
java.lang.String separator,
java.lang.String suffix,
boolean all) |
Form a String of the all the statistics and present in an organized manner.
|
org.apache.hadoop.fs.statistics.IOStatistics |
getIOStatistics() |
Returning the instance of IOStatisticsStore used to collect the metrics
in AbfsCounters.
|
void |
incrementCounter(AbfsStatistic statistic,
long value) |
Increment a AbfsStatistic by a long value.
|
java.util.Map<java.lang.String,java.lang.Long> |
toMap() |
Convert all the statistics into a key-value pair map to be used for
testing.
|
org.apache.hadoop.fs.statistics.DurationTracker |
trackDuration(java.lang.String key) |
Tracks the duration of a statistic.
|
public void incrementCounter(AbfsStatistic statistic, long value)
incrementCounter in interface AbfsCountersstatistic - AbfsStatistic need to be incremented.value - long value to be incremented by.public java.lang.String formString(java.lang.String prefix,
java.lang.String separator,
java.lang.String suffix,
boolean all)
formString in interface AbfsCountersprefix - string that would be before metric.separator - string that would be between metric name and value.suffix - string that would be after metric value.all - gets all the values even if unchanged.@VisibleForTesting public java.util.Map<java.lang.String,java.lang.Long> toMap()
toMap in interface AbfsCounterspublic org.apache.hadoop.fs.statistics.IOStatistics getIOStatistics()
getIOStatistics in interface org.apache.hadoop.fs.statistics.IOStatisticsSourcepublic org.apache.hadoop.fs.statistics.DurationTracker trackDuration(java.lang.String key)
trackDuration in interface AbfsCounterstrackDuration in interface org.apache.hadoop.fs.statistics.DurationTrackerFactorykey - name of the statistic.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.