public class BondedS3AStatisticsContext extends Object implements S3AStatisticsContext
An interface is used to bind to the relevant fields, rather than have them passed in the constructor because some production code, specifically, DelegateToFileSystem, patches the protected field after initialization.
All operations are passed through directly to that class.
If an instance of FileSystem.Statistics is passed in, it will be used whenever input stream statistics are created - However, Internally always increments the statistics in the current thread.
As a result, cross-thread IO will under-report.
This is addressed through the stream statistics classes only updating the stats in the close() call. Provided they are closed in the worker thread, all stats collected in helper threads will be included.| Modifier and Type | Class and Description |
|---|---|
static interface |
BondedS3AStatisticsContext.S3AFSStatisticsSource
This is the interface which an integration source must implement
for the integration.
|
| Constructor and Description |
|---|
BondedS3AStatisticsContext(BondedS3AStatisticsContext.S3AFSStatisticsSource statisticsSource)
Instantiate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addValueToQuantiles(Statistic op,
long value)
Add a value to a quantiles statistic.
|
S3AMultipartUploaderStatistics |
createMultipartUploaderStatistics()
Creaet a multipart statistics collector.
|
void |
decrementGauge(Statistic op,
long count)
Decrement a specific gauge.
|
void |
incrementCounter(Statistic op,
long count)
Increment a specific counter.
|
void |
incrementGauge(Statistic op,
long count)
Increment a specific gauge.
|
CommitterStatistics |
newCommitterStatistics()
Create a new instance of the committer statistics.
|
DelegationTokenStatistics |
newDelegationTokenStatistics()
Create a delegation token statistics instance.
|
S3AInputStreamStatistics |
newInputStreamStatistics()
Create a stream input statistics instance.
|
BlockOutputStreamStatistics |
newOutputStreamStatistics()
Create a stream output statistics instance.
|
StatisticsFromAwsSdk |
newStatisticsFromAwsSdk()
Create a StatisticsFromAwsSdk instance.
|
void |
recordDuration(Statistic op,
boolean success,
Duration duration)
Record a duration.
|
org.apache.hadoop.fs.statistics.DurationTracker |
trackDuration(String key,
long count) |
public BondedS3AStatisticsContext(BondedS3AStatisticsContext.S3AFSStatisticsSource statisticsSource)
statisticsSource - integration bindingpublic S3AInputStreamStatistics newInputStreamStatistics()
statisticsSource
is used as the reference to FileSystem statistics to updatenewInputStreamStatistics in interface S3AStatisticsContextpublic CommitterStatistics newCommitterStatistics()
newCommitterStatistics in interface S3AStatisticsContextpublic BlockOutputStreamStatistics newOutputStreamStatistics()
newOutputStreamStatistics in interface S3AStatisticsContextpublic void incrementCounter(Statistic op, long count)
No-op if not defined.
incrementCounter in interface CountersAndGaugesop - operationcount - increment valuepublic void incrementGauge(Statistic op, long count)
No-op if not defined.
incrementGauge in interface CountersAndGaugesop - operationcount - increment valueClassCastException - if the metric is of the wrong typepublic void decrementGauge(Statistic op, long count)
No-op if not defined.
decrementGauge in interface CountersAndGaugesop - operationcount - increment valueClassCastException - if the metric is of the wrong typepublic void addValueToQuantiles(Statistic op, long value)
addValueToQuantiles in interface CountersAndGaugesop - operation to look up.value - value to add.ClassCastException - if the metric is not a Quantiles.public void recordDuration(Statistic op, boolean success, Duration duration)
CountersAndGaugesrecordDuration in interface CountersAndGaugesop - operationsuccess - was the operation a success?duration - how long did it takepublic DelegationTokenStatistics newDelegationTokenStatistics()
newDelegationTokenStatistics in interface S3AStatisticsContextpublic StatisticsFromAwsSdk newStatisticsFromAwsSdk()
S3AStatisticsContextnewStatisticsFromAwsSdk in interface S3AStatisticsContextpublic S3AMultipartUploaderStatistics createMultipartUploaderStatistics()
S3AStatisticsContextcreateMultipartUploaderStatistics in interface S3AStatisticsContextpublic org.apache.hadoop.fs.statistics.DurationTracker trackDuration(String key, long count)
trackDuration in interface org.apache.hadoop.fs.statistics.DurationTrackerFactoryCopyright © 2008–2024 Apache Software Foundation. All rights reserved.