Class LogCompactionService
java.lang.Object
com.linkedin.venice.service.AbstractVeniceService
com.linkedin.venice.controller.logcompaction.LogCompactionService
- All Implemented Interfaces:
Closeable,AutoCloseable
This service is in charge of scheduling periodic log compaction & utilising
VeniceHelixAdmin to trigger log compaction.
The service runs in child controllers & initialised in VeniceController.
Workflow:
1. schedules LogCompactionService.LogCompactionTask periodically to perform log compaction for all stores in the cluster
controlled by the VeniceController instance that runs this LogCompactionService instance
2. checks for stores that are ready for log compaction with function VeniceHelixAdmin.getStoresForCompaction(String)
3. triggers compaction for each store with function VeniceHelixAdmin.repushStore(RepushJobRequest)
See CompactionManager for the logic to determine if a store is ready for compaction-
Nested Class Summary
Nested classes/interfaces inherited from class com.linkedin.venice.service.AbstractVeniceService
AbstractVeniceService.ServiceState -
Field Summary
FieldsFields inherited from class com.linkedin.venice.service.AbstractVeniceService
logger, serviceState -
Constructor Summary
ConstructorsConstructorDescriptionLogCompactionService(Admin admin, String clusterName, VeniceControllerClusterConfig clusterConfigs) -
Method Summary
-
Field Details
-
PRE_EXECUTION_DELAY_MS
public static final int PRE_EXECUTION_DELAY_MS- See Also:
-
-
Constructor Details
-
LogCompactionService
public LogCompactionService(Admin admin, String clusterName, VeniceControllerClusterConfig clusterConfigs)
-
-
Method Details
-
startInner
- Specified by:
startInnerin 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.serviceStatetoAbstractVeniceService.ServiceState.STARTEDupon completion of the async work). - Throws:
Exception
-
stopInner
- Specified by:
stopInnerin classAbstractVeniceService- Throws:
Exception
-