Class CompactionManager
java.lang.Object
com.linkedin.venice.controller.logcompaction.CompactionManager
This class contains functions used by
VeniceHelixAdmin to:
1. Get stores ready for compaction based on a set of criteria. These criteria have individual functions if they involve
multiple steps.
2. Trigger repush to compact a store with function RepushOrchestrator.repush(RepushJobRequest) & processes the status/response of the repush job.-
Constructor Summary
ConstructorsConstructorDescriptionCompactionManager(RepushOrchestrator repushOrchestrator, Set<RepushCandidateFilter> candidateFilters, Map<String, LogCompactionStats> statsMap) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfilterStore(StoreInfo storeInfo, String clusterName) This function abstracts the criteria for a store to be ready for compaction public for testing inTestHybrid.testHybridStoreLogCompaction()TODO: move TestHybrid::testHybridStoreLogCompaction to TestCompactionManager, then make this class package privategetStoresForCompaction(String clusterName, Map<String, ControllerClient> childControllers) This function iterates over a list of child controllers, in order to obtain the list of stores in each child controller, and then filter out the stores that are ready for compaction with functionfilterStoresForCompaction(java.util.List<com.linkedin.venice.meta.StoreInfo>, java.lang.String).repushStore(RepushJobRequest repushJobRequest) This function triggers a repush job to perform log compaction on the topic of a store.
-
Constructor Details
-
CompactionManager
public CompactionManager(RepushOrchestrator repushOrchestrator, Set<RepushCandidateFilter> candidateFilters, Map<String, LogCompactionStats> statsMap)
-
-
Method Details
-
getStoresForCompaction
public List<StoreInfo> getStoresForCompaction(String clusterName, Map<String, ControllerClient> childControllers) This function iterates over a list of child controllers, in order to obtain the list of stores in each child controller, and then filter out the stores that are ready for compaction with functionfilterStoresForCompaction(java.util.List<com.linkedin.venice.meta.StoreInfo>, java.lang.String).- Parameters:
clusterName- cluster to look for compaction-ready stores inchildControllers- list of controllers to look for compaction-ready stores in- Returns:
- list of StoreInfo of stores ready for log compaction in clusterName
-
filterStore
This function abstracts the criteria for a store to be ready for compaction public for testing inTestHybrid.testHybridStoreLogCompaction()TODO: move TestHybrid::testHybridStoreLogCompaction to TestCompactionManager, then make this class package private -
repushStore
This function triggers a repush job to perform log compaction on the topic of a store.- intermediary between
VeniceHelixAdmin.repushStore(com.linkedin.venice.controller.repush.RepushJobRequest)andRepushOrchestrator.repush(com.linkedin.venice.controller.repush.RepushJobRequest)- a wrapper around repush() - handles repush job status/response- Parameters:
repushJobRequest-- Throws:
Exception
-