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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPair of container data and the number of blocks to delete.Nested classes/interfaces inherited from class org.apache.hadoop.hdds.utils.BackgroundService
org.apache.hadoop.hdds.utils.BackgroundService.PeriodicalTask -
Constructor Summary
ConstructorsConstructorDescriptionBlockDeletingService(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) BlockDeletingService(OzoneContainer ozoneContainer, long serviceInterval, long serviceTimeout, TimeUnit timeUnit, int workerSize, org.apache.hadoop.hdds.conf.ConfigurationSource conf, ContainerChecksumTreeManager checksumTreeManager) -
Method Summary
Modifier and TypeMethodDescriptionchooseContainerForBlockDeletion(int blockLimit, ContainerDeletionChoosingPolicy deletionPolicy) intorg.apache.hadoop.hdds.conf.ConfigurationSourcegetConf()org.apache.hadoop.hdds.utils.BackgroundTaskQueuegetTasks()voidregisterReconfigCallbacks(org.apache.hadoop.hdds.conf.ReconfigurationHandler handler) voidupdateAndRestart(org.apache.hadoop.hdds.conf.OzoneConfiguration ozoneConf) Methods inherited from class org.apache.hadoop.hdds.utils.BackgroundService
execTaskCompletion, getExecutorService, getFuture, getIntervalMillis, getThreadCount, runPeriodicalTaskNow, setInterval, setPoolSize, setServiceTimeoutInNanos, shutdown, start
-
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:
getTasksin classorg.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
-
getConf
public org.apache.hadoop.hdds.conf.ConfigurationSource getConf() -
getMetrics
-
getBlockDeletingMaxLockHoldingTime
-
getBlockLimitPerInterval
public int getBlockLimitPerInterval()
-