PrefetchingStatistics (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.fs.impl.prefetch, interface: PrefetchingStatistics

Package org.apache.hadoop.fs.impl.prefetch

# Interface PrefetchingStatistics

All Superinterfaces:
  `IOStatisticsSource`

All Known Implementing Classes:
  `EmptyPrefetchingStatistics`

public interface PrefetchingStatistics extends IOStatisticsSource

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `blockAddedToFileCache()`
  A block has been saved to the file cache.
  `void`
  `blockEvictedFromFileCache()`
  A block has been evicted from the file cache.
  `void`
  `blockRemovedFromFileCache()`
  A block has been removed from the file cache.
  `void`
  `executorAcquired(Duration timeInQueue)`
  An executor has been acquired, either for prefetching or caching.
  `void`
  `memoryAllocated(int size)`
  A new buffer has been added to the buffer pool.
  `void`
  `memoryFreed(int size)`
  Previously allocated memory has been freed.
  `void`
  `prefetchOperationCompleted()`
  A prefetch operation has completed.
  `DurationTracker`
  `prefetchOperationStarted()`
  A prefetch operation has started.

  ### Methods inherited from interface org.apache.hadoop.fs.statistics.IOStatisticsSource

  `getIOStatistics`

- ## Method Details

  - ### prefetchOperationStarted

    DurationTracker prefetchOperationStarted()
    A prefetch operation has started.
    Returns:
      duration tracker

  - ### blockAddedToFileCache

    void blockAddedToFileCache()
    A block has been saved to the file cache.

  - ### blockRemovedFromFileCache

    void blockRemovedFromFileCache()
    A block has been removed from the file cache.

  - ### blockEvictedFromFileCache

    void blockEvictedFromFileCache()
    A block has been evicted from the file cache.

  - ### prefetchOperationCompleted

    void prefetchOperationCompleted()
    A prefetch operation has completed.

  - ### executorAcquired

    void executorAcquired(Duration timeInQueue)
    An executor has been acquired, either for prefetching or caching.
    Parameters:
      `timeInQueue` - time taken to acquire an executor.

  - ### memoryAllocated

    void memoryAllocated(int size)
    A new buffer has been added to the buffer pool.
    Parameters:
      `size` - size of the new buffer

  - ### memoryFreed

    void memoryFreed(int size)
    Previously allocated memory has been freed.
    Parameters:
      `size` - size of memory freed.