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 Details

    • blockUploadQueued

      void blockUploadQueued(long blockSize)
      Block is queued for upload.
      Parameters:
      blockSize - block size.
    • blockUploadStarted

      void blockUploadStarted(Duration timeInQueue, long blockSize)
      Queued block has been scheduled for upload.
      Parameters:
      timeInQueue - time in the queue.
      blockSize - block size.
    • blockUploadCompleted

      void blockUploadCompleted(Duration timeSinceUploadStarted, long blockSize)
      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

      void blockUploadFailed(Duration timeSinceUploadStarted, long blockSize)
      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

      Long lookupCounterValue(String name)
      Get the value of a counter.
      Parameters:
      name - counter name
      Returns:
      the value or null if no matching counter was found.
    • lookupGaugeValue

      Long lookupGaugeValue(String name)
      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 - true if the conditional create operation succeeded, false if it failed.