Class CompactedHFilesDischarger

java.lang.Object
org.apache.hadoop.hbase.ScheduledChore
org.apache.hadoop.hbase.regionserver.CompactedHFilesDischarger
All Implemented Interfaces:
Runnable

@Private public class CompactedHFilesDischarger extends ScheduledChore
A chore service that periodically cleans up the compacted files when there are no active readers using those compacted files and also helps in clearing the block cache of these compacted file entries.
  • Field Details

  • Constructor Details

    • CompactedHFilesDischarger

      public CompactedHFilesDischarger(int period, Stoppable stopper, RegionServerServices regionServerServices)
      Parameters:
      period - the period of time to sleep between each run
      stopper - the stopper
      regionServerServices - the region server that starts this chore
    • CompactedHFilesDischarger

      public CompactedHFilesDischarger(int period, Stoppable stopper, RegionServerServices regionServerServices, boolean useExecutor)
      Parameters:
      period - the period of time to sleep between each run
      stopper - the stopper
      regionServerServices - the region server that starts this chore
      useExecutor - true if to use the region server's executor service, false otherwise
  • Method Details

    • setUseExecutor

      public boolean setUseExecutor(boolean useExecutor)
      CompactedHFilesDischarger runs asynchronously by default using the hosting RegionServer's Executor. In tests it can be useful to force a synchronous cleanup. Use this method to set no-executor before you call run.
      Returns:
      The old setting for useExecutor
    • chore

      public void chore()
      Description copied from class: ScheduledChore
      The task to execute on each scheduled execution of the Chore
      Specified by:
      chore in class ScheduledChore