Interface BlockOutputStreamStatistics
- All Superinterfaces:
AutoCloseable,Closeable,org.apache.hadoop.fs.statistics.DurationTrackerFactory,org.apache.hadoop.fs.statistics.IOStatisticsSource,PutTrackerStatistics,S3AStatisticInterface
public interface BlockOutputStreamStatistics
extends Closeable, S3AStatisticInterface, PutTrackerStatistics
Block output stream statistics.
-
Method Summary
Modifier and TypeMethodDescriptionvoidA block has been allocated.voidA block has been released.voidblockUploadCompleted(Duration timeSinceUploadStarted, long blockSize) A block upload has completed, successfully or not.voidblockUploadFailed(Duration timeSinceUploadStarted, long blockSize) A block upload has failed.voidblockUploadQueued(long blockSize) Block is queued for upload.voidblockUploadStarted(Duration timeInQueue, long blockSize) Queued block has been scheduled for upload.voidbytesTransferred(long byteCount) Intermediate report of bytes uploaded.voidcommitUploaded(long size) Data has been uploaded to be committed in a subsequent operation; to be called at the end of the write.voidconditionalCreateOutcome(boolean success) Record the outcome of a conditional create operation.voidNote an exception in a multipart abort.voidexceptionInMultipartComplete(int count) Note exception in a multipart complete.intGet counters of blocks actively allocated; may be inaccurate if the numbers change during the (non-synchronized) calculation.intintlongGet the number of bytes pending upload.longGet the current count of bytes written.voidSyncable.hflush() has been invoked.voidSyncable.hsync() has been invoked.lookupCounterValue(String name) Get the value of a counter.lookupGaugeValue(String name) Get the value of a gauge.voidwriteBytes(long count) Record bytes written.Methods inherited from interface org.apache.hadoop.fs.statistics.DurationTrackerFactory
trackDuration, trackDurationMethods inherited from interface org.apache.hadoop.fs.statistics.IOStatisticsSource
getIOStatistics
-
Method Details
-
blockUploadQueued
void blockUploadQueued(long blockSize) Block is queued for upload.- Parameters:
blockSize- block size.
-
blockUploadStarted
Queued block has been scheduled for upload.- Parameters:
timeInQueue- time in the queue.blockSize- block size.
-
blockUploadCompleted
A block upload has completed, successfully or not. Duration excludes time in the queue.- Parameters:
timeSinceUploadStarted- time in since the transfer began.blockSize- block size
-
blockUploadFailed
A block upload has failed. Duration excludes time in the queue.A final transfer completed event is still expected, so this does not decrement the active block counter.
- Parameters:
timeSinceUploadStarted- time in since the transfer began.blockSize- block size
-
bytesTransferred
void bytesTransferred(long byteCount) Intermediate report of bytes uploaded.- Parameters:
byteCount- bytes uploaded
-
exceptionInMultipartComplete
void exceptionInMultipartComplete(int count) Note exception in a multipart complete.- Parameters:
count- count of exceptions
-
exceptionInMultipartAbort
void exceptionInMultipartAbort()Note an exception in a multipart abort. -
getBytesPendingUpload
long getBytesPendingUpload()Get the number of bytes pending upload.- Returns:
- the number of bytes in the pending upload state.
-
commitUploaded
void commitUploaded(long size) Data has been uploaded to be committed in a subsequent operation; to be called at the end of the write.- Parameters:
size- size in bytes
-
getBlocksAllocated
int getBlocksAllocated() -
getBlocksReleased
int getBlocksReleased() -
getBlocksActivelyAllocated
int getBlocksActivelyAllocated()Get counters of blocks actively allocated; may be inaccurate if the numbers change during the (non-synchronized) calculation.- Returns:
- the number of actively allocated blocks.
-
writeBytes
void writeBytes(long count) Record bytes written.- Parameters:
count- number of bytes
-
getBytesWritten
long getBytesWritten()Get the current count of bytes written.- Returns:
- the counter value.
-
blockAllocated
void blockAllocated()A block has been allocated. -
blockReleased
void blockReleased()A block has been released. -
lookupCounterValue
Get the value of a counter.- Parameters:
name- counter name- Returns:
- the value or null if no matching counter was found.
-
lookupGaugeValue
Get the value of a gauge.- Parameters:
name- gauge name- Returns:
- the value or null if no matching gauge was found.
-
hflushInvoked
void hflushInvoked()Syncable.hflush() has been invoked. -
hsyncInvoked
void hsyncInvoked()Syncable.hsync() has been invoked. -
conditionalCreateOutcome
void conditionalCreateOutcome(boolean success) Record the outcome of a conditional create operation.This method increments the appropriate counter based on whether the conditional create operation was successful or failed.
- Parameters:
success-trueif the conditional create operation succeeded,falseif it failed.
-