Class AbstractKeyDeletingService
java.lang.Object
org.apache.hadoop.hdds.utils.BackgroundService
org.apache.hadoop.ozone.om.service.AbstractKeyDeletingService
- All Implemented Interfaces:
org.apache.hadoop.ozone.lock.BootstrapStateHandler
- Direct Known Subclasses:
DirectoryDeletingService,KeyDeletingService,SnapshotDeletingService
public abstract class AbstractKeyDeletingService
extends org.apache.hadoop.hdds.utils.BackgroundService
implements org.apache.hadoop.ozone.lock.BootstrapStateHandler
Abstracts common code from KeyDeletingService and DirectoryDeletingService
which is now used by SnapshotDeletingService as well.
-
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 -
Field Summary
Fields inherited from class org.apache.hadoop.hdds.utils.BackgroundService
LOG -
Constructor Summary
ConstructorsConstructorDescriptionAbstractKeyDeletingService(String serviceName, long interval, TimeUnit unit, int threadPoolSize, long serviceTimeout, OzoneManager ozoneManager) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.ozone.lock.BootstrapStateHandler.LockReturns the number of times this Background service has run.protected booleanisBufferLimitCrossed(int maxLimit, int cLimit, int increment) voidresume()Resume the service if suspended.protected org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponsesubmitRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest omRequest) protected voidsubmitSetSnapshotRequests(List<org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetSnapshotPropertyRequest> setSnapshotPropertyRequests) Submits SetSnapsnapshotPropertyRequest to OM.voidsuspend()Suspend the service.Methods inherited from class org.apache.hadoop.hdds.utils.BackgroundService
execTaskCompletion, getExecutorService, getFuture, getIntervalMillis, getTasks, getThreadCount, runPeriodicalTaskNow, setInterval, setPoolSize, setServiceTimeoutInNanos, shutdown, start
-
Constructor Details
-
AbstractKeyDeletingService
public AbstractKeyDeletingService(String serviceName, long interval, TimeUnit unit, int threadPoolSize, long serviceTimeout, OzoneManager ozoneManager)
-
-
Method Details
-
submitRequest
protected org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse submitRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest omRequest) throws com.google.protobuf.ServiceException - Throws:
com.google.protobuf.ServiceException
-
suspend
Suspend the service. -
resume
public void resume()Resume the service if suspended. -
isBufferLimitCrossed
protected boolean isBufferLimitCrossed(int maxLimit, int cLimit, int increment) -
getOzoneManager
-
getRunCount
Returns the number of times this Background service has run.- Returns:
- Long, run count.
-
getCallId
-
getBootstrapStateLock
public org.apache.hadoop.ozone.lock.BootstrapStateHandler.Lock getBootstrapStateLock()- Specified by:
getBootstrapStateLockin interfaceorg.apache.hadoop.ozone.lock.BootstrapStateHandler
-
submitSetSnapshotRequests
protected void submitSetSnapshotRequests(List<org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.SetSnapshotPropertyRequest> setSnapshotPropertyRequests) Submits SetSnapsnapshotPropertyRequest to OM.- Parameters:
setSnapshotPropertyRequests- request to be sent to OM
-