Class EmptyS3AStatisticsContext
java.lang.Object
org.apache.hadoop.fs.s3a.statistics.impl.EmptyS3AStatisticsContext
- All Implemented Interfaces:
CountersAndGauges,S3AStatisticsContext,org.apache.hadoop.fs.statistics.DurationTrackerFactory
Special statistics context, all of whose context operations are no-ops.
All statistics instances it returns are also empty.
This class is here primarily to aid in testing, but it also allows for classes to require a non-empty statistics context in their constructor -yet still be instantiated without one bound to any filesystem.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classMultipart Uploader. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BlockOutputStreamStatisticsstatic final CommitterStatisticsstatic final DelegationTokenStatisticsstatic final S3AInputStreamStatisticsstatic final StatisticsFromAwsSdk -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddValueToQuantiles(Statistic op, long value) Add a value to a quantiles statistic.Creaet a multipart statistics collector.voiddecrementGauge(Statistic op, long count) Decrement a specific gauge.voidincrementCounter(Statistic op, long count) Increment a specific counter.voidincrementGauge(Statistic op, long count) Increment a specific gauge.Create a new instance of the committer statistics.Create a delegation token statistics instance.Create a stream input statistics instance.Create a stream output statistics instance.Create a StatisticsFromAwsSdk instance.voidrecordDuration(Statistic op, boolean success, Duration duration) Record a duration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.fs.statistics.DurationTrackerFactory
trackDuration, trackDuration
-
Field Details
-
EMPTY_INPUT_STREAM_STATISTICS
-
EMPTY_COMMITTER_STATISTICS
-
EMPTY_BLOCK_OUTPUT_STREAM_STATISTICS
-
EMPTY_DELEGATION_TOKEN_STATISTICS
-
EMPTY_STATISTICS_FROM_AWS_SDK
-
-
Constructor Details
-
EmptyS3AStatisticsContext
public EmptyS3AStatisticsContext()
-
-
Method Details
-
newInputStreamStatistics
Description copied from interface:S3AStatisticsContextCreate a stream input statistics instance.- Specified by:
newInputStreamStatisticsin interfaceS3AStatisticsContext- Returns:
- the new instance
-
newCommitterStatistics
Description copied from interface:S3AStatisticsContextCreate a new instance of the committer statistics.- Specified by:
newCommitterStatisticsin interfaceS3AStatisticsContext- Returns:
- a new committer statistics instance
-
newOutputStreamStatistics
Description copied from interface:S3AStatisticsContextCreate a stream output statistics instance.- Specified by:
newOutputStreamStatisticsin interfaceS3AStatisticsContext- Returns:
- the new instance
-
newDelegationTokenStatistics
Description copied from interface:S3AStatisticsContextCreate a delegation token statistics instance.- Specified by:
newDelegationTokenStatisticsin interfaceS3AStatisticsContext- Returns:
- an instance of delegation token statistics
-
newStatisticsFromAwsSdk
Description copied from interface:S3AStatisticsContextCreate a StatisticsFromAwsSdk instance.- Specified by:
newStatisticsFromAwsSdkin interfaceS3AStatisticsContext- Returns:
- an instance of StatisticsFromAwsSdk
-
createMultipartUploaderStatistics
Description copied from interface:S3AStatisticsContextCreaet a multipart statistics collector.- Specified by:
createMultipartUploaderStatisticsin interfaceS3AStatisticsContext- Returns:
- an instance
-
incrementCounter
Description copied from interface:CountersAndGaugesIncrement a specific counter. No-op if not defined.- Specified by:
incrementCounterin interfaceCountersAndGauges- Parameters:
op- operationcount- increment value
-
incrementGauge
Description copied from interface:CountersAndGaugesIncrement a specific gauge. No-op if not defined.- Specified by:
incrementGaugein interfaceCountersAndGauges- Parameters:
op- operationcount- increment value
-
decrementGauge
Description copied from interface:CountersAndGaugesDecrement a specific gauge. No-op if not defined.- Specified by:
decrementGaugein interfaceCountersAndGauges- Parameters:
op- operationcount- increment value
-
addValueToQuantiles
Description copied from interface:CountersAndGaugesAdd a value to a quantiles statistic. No-op if the quantile isn't found.- Specified by:
addValueToQuantilesin interfaceCountersAndGauges- Parameters:
op- operation to look up.value- value to add.
-
recordDuration
Description copied from interface:CountersAndGaugesRecord a duration.- Specified by:
recordDurationin interfaceCountersAndGauges- Parameters:
op- operationsuccess- was the operation a success?duration- how long did it take
-