Class BlockDeletingService

java.lang.Object
org.apache.hadoop.hdds.utils.BackgroundService
org.apache.hadoop.ozone.container.common.impl.BlockDeletingService

public class BlockDeletingService extends org.apache.hadoop.hdds.utils.BackgroundService
A per-datanode container block deleting service takes in charge of deleting staled ozone blocks.
  • Constructor Details

    • BlockDeletingService

      public BlockDeletingService(OzoneContainer ozoneContainer, long serviceInterval, long serviceTimeout, TimeUnit timeUnit, int workerSize, org.apache.hadoop.hdds.conf.ConfigurationSource conf, ContainerChecksumTreeManager checksumTreeManager)
    • BlockDeletingService

      public BlockDeletingService(OzoneContainer ozoneContainer, long serviceInterval, long serviceTimeout, TimeUnit timeUnit, int workerSize, org.apache.hadoop.hdds.conf.ConfigurationSource conf, String threadNamePrefix, ContainerChecksumTreeManager checksumTreeManager, org.apache.hadoop.hdds.conf.ReconfigurationHandler reconfigurationHandler)
  • Method Details

    • registerReconfigCallbacks

      public void registerReconfigCallbacks(org.apache.hadoop.hdds.conf.ReconfigurationHandler handler)
    • updateAndRestart

      public void updateAndRestart(org.apache.hadoop.hdds.conf.OzoneConfiguration ozoneConf)
    • getTasks

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

      public List<BlockDeletingService.ContainerBlockInfo> chooseContainerForBlockDeletion(int blockLimit, ContainerDeletionChoosingPolicy deletionPolicy) throws org.apache.hadoop.hdds.scm.container.common.helpers.StorageContainerException
      Throws:
      org.apache.hadoop.hdds.scm.container.common.helpers.StorageContainerException
    • getOzoneContainer

      public OzoneContainer getOzoneContainer()
    • getConf

      public org.apache.hadoop.hdds.conf.ConfigurationSource getConf()
    • getMetrics

      public BlockDeletingServiceMetrics getMetrics()
    • getBlockDeletingMaxLockHoldingTime

      public Duration getBlockDeletingMaxLockHoldingTime()
    • getBlockLimitPerInterval

      public int getBlockLimitPerInterval()