Package com.linkedin.venice.pushmonitor
Class LeakedPushStatusCleanUpService
java.lang.Object
com.linkedin.venice.service.AbstractVeniceService
com.linkedin.venice.pushmonitor.LeakedPushStatusCleanUpService
- All Implemented Interfaces:
Closeable
,AutoCloseable
LeakedPushStatusCleanUpService will wake up regularly (interval is determined by controller config
ConfigKeys.LEAKED_PUSH_STATUS_CLEAN_UP_SERVICE_SLEEP_INTERVAL_MS
), get all existing push
status ZNodes on Zookeeper that belong to the specified cluster, without scanning through the replica statuses, find
all leaked push status and delete them on Zookeeper.
The life cycle of LeakedPushStatusCleanUpService matches the life cycle of HelixVeniceClusterResources
,
meaning that there is one clean up service for each cluster, and it's built when the controller is promoted to leader
role for the cluster.
The clean up service is needed because push job killing in server nodes is asynchronous, it's possible that servers
write push status after controllers think they have cleaned up the push status.-
Nested Class Summary
Nested classes/interfaces inherited from class com.linkedin.venice.service.AbstractVeniceService
AbstractVeniceService.ServiceState
-
Field Summary
Fields inherited from class com.linkedin.venice.service.AbstractVeniceService
logger, serviceState
-
Constructor Summary
ConstructorDescriptionLeakedPushStatusCleanUpService
(String clusterName, OfflinePushAccessor offlinePushAccessor, ReadOnlyStoreRepository metadataRepository, StoreCleaner storeCleaner, AggPushStatusCleanUpStats aggPushStatusCleanUpStats, long sleepIntervalInMs, long leakedResourceAllowedLingerTimeInMs) -
Method Summary
-
Constructor Details
-
LeakedPushStatusCleanUpService
public LeakedPushStatusCleanUpService(String clusterName, OfflinePushAccessor offlinePushAccessor, ReadOnlyStoreRepository metadataRepository, StoreCleaner storeCleaner, AggPushStatusCleanUpStats aggPushStatusCleanUpStats, long sleepIntervalInMs, long leakedResourceAllowedLingerTimeInMs)
-
-
Method Details
-
startInner
- Specified by:
startInner
in classAbstractVeniceService
- Returns:
- true if the service is completely started,
false if it is still starting asynchronously (in this case, it is the implementer's
responsibility to set
AbstractVeniceService.serviceState
toAbstractVeniceService.ServiceState.STARTED
upon completion of the async work). - Throws:
Exception
-
stopInner
- Specified by:
stopInner
in classAbstractVeniceService
- Throws:
Exception
-