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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hdds.utils.BackgroundService
org.apache.hadoop.hdds.utils.BackgroundService.PeriodicalTaskNested classes/interfaces inherited from interface org.apache.hadoop.ozone.lock.BootstrapStateHandler
org.apache.hadoop.ozone.lock.BootstrapStateHandler.Lock -
Constructor Summary
ConstructorsConstructorDescriptionKeyDeletingService(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 Summary
Modifier and TypeMethodDescriptionprotected voidUpdates ServiceMetrics for the last run of the service.Returns the number of keys deleted by the background service.intorg.apache.hadoop.hdds.utils.BackgroundTaskQueuegetTasks()voidsetKeyLimitPerTask(int keyLimitPerTask) Methods inherited from class org.apache.hadoop.ozone.om.service.AbstractKeyDeletingService
getBootstrapStateLock, getCallId, getOzoneManager, getRunCount, isBufferLimitCrossed, resume, submitRequest, submitSetSnapshotRequests, suspendMethods inherited from class org.apache.hadoop.hdds.utils.BackgroundService
getExecutorService, getFuture, getIntervalMillis, getThreadCount, runPeriodicalTaskNow, setInterval, setPoolSize, setServiceTimeoutInNanos, shutdown, start
-
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
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:
execTaskCompletionin classorg.apache.hadoop.hdds.utils.BackgroundService
-
getTasks
public org.apache.hadoop.hdds.utils.BackgroundTaskQueue getTasks()- Specified by:
getTasksin classorg.apache.hadoop.hdds.utils.BackgroundService
-
getKeyLimitPerTask
public int getKeyLimitPerTask() -
setKeyLimitPerTask
public void setKeyLimitPerTask(int keyLimitPerTask)
-