Class KeyDeletingService

java.lang.Object
org.apache.hadoop.hdds.utils.BackgroundService
org.apache.hadoop.ozone.om.service.AbstractKeyDeletingService
org.apache.hadoop.ozone.om.service.KeyDeletingService
All Implemented Interfaces:
org.apache.hadoop.ozone.lock.BootstrapStateHandler

public class KeyDeletingService extends AbstractKeyDeletingService
This is the background service to delete keys. Scan the metadata of om periodically to get the keys from DeletedTable and ask scm to delete metadata accordingly, if scm returns success for keys, then clean up those keys.
  • Constructor Details

    • KeyDeletingService

      public KeyDeletingService(OzoneManager ozoneManager, org.apache.hadoop.hdds.scm.protocol.ScmBlockLocationProtocol scmClient, long serviceInterval, long serviceTimeout, org.apache.hadoop.hdds.conf.ConfigurationSource conf, int keyDeletionCorePoolSize, boolean deepCleanSnapshots)
  • Method Details

    • getDeletedKeyCount

      public AtomicLong getDeletedKeyCount()
      Returns the number of keys deleted by the background service.
      Returns:
      Long count.
    • execTaskCompletion

      protected void execTaskCompletion()
      Updates ServiceMetrics for the last run of the service.
      Overrides:
      execTaskCompletion in class org.apache.hadoop.hdds.utils.BackgroundService
    • getTasks

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

      public int getKeyLimitPerTask()
    • setKeyLimitPerTask

      public void setKeyLimitPerTask(int keyLimitPerTask)