public class AbfsCountersImpl extends Object implements AbfsCounters
| Constructor and Description |
|---|
AbfsCountersImpl(URI uri) |
| Modifier and Type | Method and Description |
|---|---|
String |
formString(String prefix,
String separator,
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.
|
Map<String,Long> |
toMap()
Convert all the statistics into a key-value pair map to be used for
testing.
|
org.apache.hadoop.fs.statistics.DurationTracker |
trackDuration(String key)
Tracks the duration of a statistic.
|
public AbfsCountersImpl(URI uri)
public void incrementCounter(AbfsStatistic statistic, long value)
incrementCounter in interface AbfsCountersstatistic - AbfsStatistic need to be incremented.value - long value to be incremented by.public String formString(String prefix, String separator, 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 Map<String,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(String key)
trackDuration in interface AbfsCounterstrackDuration in interface org.apache.hadoop.fs.statistics.DurationTrackerFactorykey - name of the statistic.Copyright © 2008–2024 Apache Software Foundation. All rights reserved.