Class AwsStatisticsCollector
java.lang.Object
org.apache.hadoop.fs.s3a.statistics.impl.AwsStatisticsCollector
- All Implemented Interfaces:
AutoCloseable,software.amazon.awssdk.metrics.MetricPublisher,software.amazon.awssdk.utils.SdkAutoCloseable
public class AwsStatisticsCollector
extends Object
implements software.amazon.awssdk.metrics.MetricPublisher
Collect statistics from the AWS SDK and forward to an instance of
StatisticsFromAwsSdk and thence into the S3A statistics.
See com.facebook.presto.hive.s3.PrestoS3FileSystemMetricCollector
for the inspiration for this.
See software.amazon.awssdk.core.metrics.CoreMetric for metric names.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AwsStatisticsCollector
Instantiate.- Parameters:
collector- final destination of updates
-
-
Method Details
-
publish
public void publish(software.amazon.awssdk.metrics.MetricCollection metricCollection) This is the callback from the AWS SDK where metrics can be collected.- Specified by:
publishin interfacesoftware.amazon.awssdk.metrics.MetricPublisher- Parameters:
metricCollection- metrics collection
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacesoftware.amazon.awssdk.metrics.MetricPublisher- Specified by:
closein interfacesoftware.amazon.awssdk.utils.SdkAutoCloseable
-