Class CompactionService

java.lang.Object
org.apache.hadoop.hdds.utils.BackgroundService
org.apache.hadoop.ozone.om.service.CompactionService

public class CompactionService extends org.apache.hadoop.hdds.utils.BackgroundService
This is the background service to compact OM rocksdb tables.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.hadoop.hdds.utils.BackgroundService

    org.apache.hadoop.hdds.utils.BackgroundService.PeriodicalTask
  • Constructor Summary

    Constructors
    Constructor
    Description
    CompactionService(OzoneManager ozoneManager, TimeUnit unit, long interval, long timeout, List<String> tables)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    compactFully(String tableName)
     
     
    long
    Returns the number of manual compactions performed.
    org.apache.hadoop.hdds.utils.BackgroundTaskQueue
     
    void
    Resume the service if suspended (for testing).
    void
    Suspend the service (for testing).

    Methods inherited from class org.apache.hadoop.hdds.utils.BackgroundService

    execTaskCompletion, getExecutorService, getFuture, getIntervalMillis, getThreadCount, runPeriodicalTaskNow, setInterval, setPoolSize, setServiceTimeoutInNanos, shutdown, start

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • suspend

      public void suspend()
      Suspend the service (for testing).
    • resume

      public void resume()
      Resume the service if suspended (for testing).
    • getCompactableTables

      public List<String> getCompactableTables()
    • getNumCompactions

      public long getNumCompactions()
      Returns the number of manual compactions performed.
      Returns:
      long count.
    • getTasks

      public org.apache.hadoop.hdds.utils.BackgroundTaskQueue getTasks()
      Specified by:
      getTasks in class org.apache.hadoop.hdds.utils.BackgroundService
    • compactFully

      protected void compactFully(String tableName) throws IOException
      Throws:
      IOException