Package com.linkedin.venice.pushmonitor
Class LeakedPushStatusCleanUpService
- java.lang.Object
-
- com.linkedin.venice.service.AbstractVeniceService
-
- com.linkedin.venice.pushmonitor.LeakedPushStatusCleanUpService
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class LeakedPushStatusCleanUpService extends AbstractVeniceService
LeakedPushStatusCleanUpService will wake up regularly (interval is determined by controller configConfigKeys.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 ofHelixVeniceClusterResources
, 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
Constructors Constructor Description LeakedPushStatusCleanUpService(java.lang.String clusterName, OfflinePushAccessor offlinePushAccessor, ReadOnlyStoreRepository metadataRepository, StoreCleaner storeCleaner, AggPushStatusCleanUpStats aggPushStatusCleanUpStats, long sleepIntervalInMs, long leakedResourceAllowedLingerTimeInMs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
startInner()
void
stopInner()
-
-
-
Constructor Detail
-
LeakedPushStatusCleanUpService
public LeakedPushStatusCleanUpService(java.lang.String clusterName, OfflinePushAccessor offlinePushAccessor, ReadOnlyStoreRepository metadataRepository, StoreCleaner storeCleaner, AggPushStatusCleanUpStats aggPushStatusCleanUpStats, long sleepIntervalInMs, long leakedResourceAllowedLingerTimeInMs)
-
-
Method Detail
-
startInner
public boolean startInner() throws java.lang.Exception
- 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:
java.lang.Exception
-
stopInner
public void stopInner() throws java.lang.Exception
- Specified by:
stopInner
in classAbstractVeniceService
- Throws:
java.lang.Exception
-
-