Class CleanerService
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.yarn.server.sharedcachemanager.CleanerService
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service
@Private
@Evolving
public class CleanerService
extends org.apache.hadoop.service.CompositeService
The cleaner service that maintains the shared cache area, and cleans up stale
entries on a regular basis.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.service.CompositeService
org.apache.hadoop.service.CompositeService.CompositeServiceShutdownHookNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the global cleaner lock that the cleaner creates to indicate that a cleaning process is in progress.Fields inherited from class org.apache.hadoop.service.CompositeService
STOP_ONLY_STARTED_SERVICES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidExecute an on-demand cleaner task.protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) protected voidprotected voidMethods inherited from class org.apache.hadoop.service.CompositeService
addIfService, addService, getServices, removeServiceMethods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
-
Field Details
-
GLOBAL_CLEANER_PID
The name of the global cleaner lock that the cleaner creates to indicate that a cleaning process is in progress.- See Also:
-
-
Constructor Details
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
serviceStart
- Overrides:
serviceStartin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
serviceStop
- Overrides:
serviceStopin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
runCleanerTask
protected void runCleanerTask()Execute an on-demand cleaner task.
-