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, AggVersionedDIVStats, AggVersionedIngestionStats, AggVersionedStorageEngineStats, HeartbeatVersionedStats

public abstract class AbstractVeniceAggVersionedStats<STATS,STATS_REPORTER extends AbstractVeniceStatsReporter<STATS>> extends Object implements StoreDataChangedListener
  • Field Details

  • Constructor Details

  • Method Details

    • loadAllStats

      public void loadAllStats()
    • recordVersionedAndTotalStat

      protected void recordVersionedAndTotalStat(String storeName, int version, Consumer<STATS> function)
    • getTotalStats

      protected STATS getTotalStats(String storeName)
    • getStats

      protected STATS getStats(String storeName, int version)
    • registerConditionalStats

      protected void registerConditionalStats(String storeName)
    • addStore

      protected VeniceVersionedStats<STATS,STATS_REPORTER> addStore(String storeName)
    • updateStatsVersionInfo

      protected void updateStatsVersionInfo(String storeName, List<Version> existingVersions, int newCurrentVersion)
    • handleStoreCreated

      public void handleStoreCreated(Store store)
      Description copied from interface: StoreDataChangedListener
      Do NOT try to acquire the lock of store repository again in the implementation, otherwise a dead lock issue will happen.
      Specified by:
      handleStoreCreated in interface StoreDataChangedListener
    • handleStoreDeleted

      public void handleStoreDeleted(String storeName)
      Specified by:
      handleStoreDeleted in interface StoreDataChangedListener
    • handleStoreChanged

      public void handleStoreChanged(Store store)
      Specified by:
      handleStoreChanged in interface StoreDataChangedListener
    • isFutureVersion

      public boolean isFutureVersion(String storeName, int version)
    • getFutureVersion

      protected int getFutureVersion(String storeName)
      return Store.NON_EXISTING_VERSION if future version doesn't exist.
    • getCurrentVersion

      protected int getCurrentVersion(String storeName)
      return Store.NON_EXISTING_VERSION if current version doesn't exist.
    • updateTotalStats

      protected void updateTotalStats(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.