Package com.linkedin.davinci.stats
Class AbstractVeniceAggVersionedStats<STATS,STATS_REPORTER extends AbstractVeniceStatsReporter<STATS>>
java.lang.Object
com.linkedin.davinci.stats.AbstractVeniceAggVersionedStats<STATS,STATS_REPORTER>
- All Implemented Interfaces:
StoreDataChangedListener
- Direct Known Subclasses:
AggVersionedBlobTransferStats,AggVersionedDaVinciRecordTransformerStats,AggVersionedDIVStats,AggVersionedIngestionStats,AggVersionedStorageEngineStats,HeartbeatVersionedStats
public abstract class AbstractVeniceAggVersionedStats<STATS,STATS_REPORTER extends AbstractVeniceStatsReporter<STATS>>
extends Object
implements StoreDataChangedListener
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractVeniceAggVersionedStats(io.tehuti.metrics.MetricsRepository metricsRepository, ReadOnlyStoreRepository metadataRepository, Supplier<STATS> statsInitiator, StatsSupplier<STATS_REPORTER> reporterSupplier, boolean unregisterMetricForDeletedStoreEnabled) -
Method Summary
Modifier and TypeMethodDescriptionprotected VeniceVersionedStats<STATS,STATS_REPORTER> protected intgetCurrentVersion(String storeName) returnStore.NON_EXISTING_VERSIONif current version doesn't exist.protected intgetFutureVersion(String storeName) returnStore.NON_EXISTING_VERSIONif future version doesn't exist.protected STATSprotected STATSgetTotalStats(String storeName) voidhandleStoreChanged(Store store) voidhandleStoreCreated(Store store) Do NOT try to acquire the lock of store repository again in the implementation, otherwise a dead lock issue will happen.voidhandleStoreDeleted(String storeName) voidprotected voidrecordVersionedAndTotalStat(String storeName, int version, Consumer<STATS> function) protected voidregisterConditionalStats(String storeName) protected voidupdateStatsVersionInfo(String storeName, List<Version> existingVersions, int newCurrentVersion) protected voidupdateTotalStats(String storeName) Some versioned stats might always increasing; in this case, the value in the total stats should be updated with the aggregated values across the new version list.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.linkedin.venice.meta.StoreDataChangedListener
handleStoreDeleted
-
Field Details
-
metadataRepository
-
-
Constructor Details
-
AbstractVeniceAggVersionedStats
public AbstractVeniceAggVersionedStats(io.tehuti.metrics.MetricsRepository metricsRepository, ReadOnlyStoreRepository metadataRepository, Supplier<STATS> statsInitiator, StatsSupplier<STATS_REPORTER> reporterSupplier, boolean unregisterMetricForDeletedStoreEnabled)
-
-
Method Details
-
loadAllStats
public void loadAllStats() -
recordVersionedAndTotalStat
-
getTotalStats
-
getStats
-
registerConditionalStats
-
addStore
-
updateStatsVersionInfo
-
handleStoreCreated
Description copied from interface:StoreDataChangedListenerDo NOT try to acquire the lock of store repository again in the implementation, otherwise a dead lock issue will happen.- Specified by:
handleStoreCreatedin interfaceStoreDataChangedListener
-
handleStoreDeleted
- Specified by:
handleStoreDeletedin interfaceStoreDataChangedListener
-
handleStoreChanged
- Specified by:
handleStoreChangedin interfaceStoreDataChangedListener
-
getFutureVersion
returnStore.NON_EXISTING_VERSIONif future version doesn't exist. -
getCurrentVersion
returnStore.NON_EXISTING_VERSIONif current version doesn't exist. -
updateTotalStats
Some versioned stats might always increasing; in this case, the value in the total stats should be updated with the aggregated values across the new version list.
-