Class AggVersionedBlobTransferStats
- All Implemented Interfaces:
StoreDataChangedListener
AbstractVeniceAggVersionedStats to provide automatic aggregation across
all versions of a store.
OTel stats lifecycle: OTel stats are created lazily by getBlobTransferOtelStats(java.lang.String)
and updated by onVersionInfoUpdated(java.lang.String, int, int) via computeIfPresent. This class uses
eager loading (loadAllStats() is NOT overridden), so onVersionInfoUpdated
needs a null guard because it is called during the super() constructor before subclass fields
(otelStatsMap) are initialized. cleanupVersionResources is not overridden
because BlobTransferOtelStats has no per-version state to clean up — version
classification is handled by volatile VersionInfo, which is updated separately.
-
Field Summary
Fields inherited from class com.linkedin.davinci.stats.AbstractVeniceAggVersionedStats
metadataRepository -
Constructor Summary
ConstructorsConstructorDescriptionAggVersionedBlobTransferStats(io.tehuti.metrics.MetricsRepository metricsRepository, ReadOnlyStoreRepository metadataRepository, VeniceServerConfig serverConfig) Constructs an AggVersionedBlobTransferStats instance.AggVersionedBlobTransferStats(io.tehuti.metrics.MetricsRepository metricsRepository, ReadOnlyStoreRepository metadataRepository, VeniceServerConfig serverConfig, Time time) Constructor for testing that allows injecting a Time instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleStoreDeleted(String storeName) protected voidonVersionInfoUpdated(String storeName, int currentVersion, int futureVersion) Updates version info for existing OTel stats only.voidrecordBlobTransferBytesReceived(String storeName, int version, long value) Records the number of bytes received during a blob transfer operation (Tehuti and OTel).voidrecordBlobTransferBytesSent(String storeName, int version, long value) Records the number of bytes sent during a blob transfer operation (Tehuti and OTel).voidrecordBlobTransferFileReceiveThroughput(String storeName, int version, double throughput) Record the blob transfer file receive throughput (Tehuti only).voidrecordBlobTransferResponsesBasedOnBoostrapStatus(String storeName, int version, boolean isBlobTransferSuccess) Records the blob transfer request count based on the bootstrap status (Tehuti and OTel).voidrecordBlobTransferResponsesCount(String storeName, int version) Record the blob transfer request count (Tehuti only).voidrecordBlobTransferTimeInSec(String storeName, int version, double timeInSec) Records the blob transfer time (Tehuti and OTel).Methods inherited from class com.linkedin.davinci.stats.AbstractVeniceAggVersionedStats
addStore, cleanupVersionResources, getCurrentVersion, getFutureVersion, getMetricsRepository, getStats, getTotalStats, handleStoreChanged, handleStoreCreated, loadAllStats, recordVersionedAndTotalStat, registerConditionalStats, updateStatsVersionInfo, updateTotalStatsMethods 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
-
Constructor Details
-
AggVersionedBlobTransferStats
public AggVersionedBlobTransferStats(io.tehuti.metrics.MetricsRepository metricsRepository, ReadOnlyStoreRepository metadataRepository, VeniceServerConfig serverConfig) Constructs an AggVersionedBlobTransferStats instance.- Parameters:
metricsRepository- the metrics repository for recording statisticsmetadataRepository- the store metadata repositoryserverConfig- the Venice server configuration
-
AggVersionedBlobTransferStats
public AggVersionedBlobTransferStats(io.tehuti.metrics.MetricsRepository metricsRepository, ReadOnlyStoreRepository metadataRepository, VeniceServerConfig serverConfig, Time time) Constructor for testing that allows injecting a Time instance.- Parameters:
metricsRepository- the metrics repository for recording statisticsmetadataRepository- the store metadata repositoryserverConfig- the Venice server configurationtime- the time instance for testing purposes
-
-
Method Details
-
onVersionInfoUpdated
Updates version info for existing OTel stats only. Null guard needed because eager loading calls this from the super() constructor beforeotelStatsMapis initialized.- Overrides:
onVersionInfoUpdatedin classAbstractVeniceAggVersionedStats<BlobTransferStats,BlobTransferStatsReporter>
-
handleStoreDeleted
- Specified by:
handleStoreDeletedin interfaceStoreDataChangedListener- Overrides:
handleStoreDeletedin classAbstractVeniceAggVersionedStats<BlobTransferStats,BlobTransferStatsReporter>
-
recordBlobTransferResponsesCount
Record the blob transfer request count (Tehuti only).OTel metrics are intentionally NOT recorded here to avoid double-counting. OTel uses a single counter with a
VeniceResponseStatusCategorydimension, recorded byrecordBlobTransferResponsesBasedOnBoostrapStatus(java.lang.String, int, boolean)instead. The total is the sum of SUCCESS + FAIL in OTel. -
recordBlobTransferResponsesBasedOnBoostrapStatus
public void recordBlobTransferResponsesBasedOnBoostrapStatus(String storeName, int version, boolean isBlobTransferSuccess) Records the blob transfer request count based on the bootstrap status (Tehuti and OTel).- Parameters:
storeName- the store nameversion- the version of the storeisBlobTransferSuccess- true if the blob transfer is successful, false otherwise
-
recordBlobTransferFileReceiveThroughput
public void recordBlobTransferFileReceiveThroughput(String storeName, int version, double throughput) Record the blob transfer file receive throughput (Tehuti only).OTel does not have a separate throughput metric — throughput is derivable as the rate of
bytes.received. -
recordBlobTransferTimeInSec
Records the blob transfer time (Tehuti and OTel).- Parameters:
storeName- the store nameversion- the version of the storetimeInSec- the time in seconds
-
recordBlobTransferBytesReceived
Records the number of bytes received during a blob transfer operation (Tehuti and OTel).- Parameters:
storeName- the name of the Venice storeversion- the version number of the storevalue- the number of bytes received
-
recordBlobTransferBytesSent
Records the number of bytes sent during a blob transfer operation (Tehuti and OTel).- Parameters:
storeName- the name of the Venice storeversion- the version number of the storevalue- the number of bytes sent
-