Package com.linkedin.venice.stats
Class ServerReadQuotaUsageStats
java.lang.Object
com.linkedin.venice.stats.AbstractVeniceStats
com.linkedin.venice.stats.ServerReadQuotaUsageStats
For measuring quota requests and rejections for a given store.
Specifically not using
VeniceVersionedStats
due to sophisticated needs:
1. Only requestedQPS, requestedKPS, and (usageRatio) nodeKpsResponsibility need to be versioned. We'd still like to
report rejections at the store level, regardless if it came from current or backup version due to stale routing.
2. VeniceVersionedStats is tracking current and future. However, for the purpose of quota we only care about
current and backup.-
Field Summary
Fields inherited from class com.linkedin.venice.stats.AbstractVeniceStats
DELIMITER
-
Constructor Summary
ConstructorDescriptionServerReadQuotaUsageStats
(io.tehuti.metrics.MetricsRepository metricsRepository, String name) ServerReadQuotaUsageStats
(io.tehuti.metrics.MetricsRepository metricsRepository, String name, Time time) -
Method Summary
Modifier and TypeMethodDescriptionint
int
void
recordAllowed
(int version, long rcu) void
recordAllowedUnintentionally
(long rcu) void
recordRejected
(int version, long rcu) void
removeVersion
(int version) void
setBackupVersion
(int version) void
setCurrentVersion
(int version) void
setNodeQuotaResponsibility
(int version, long nodeKpsResponsibility) Methods inherited from class com.linkedin.venice.stats.AbstractVeniceStats
avgAndMax, avgAndTotal, getMetricFullName, getMetricsRepository, getName, getSensorFullName, getSensorFullName, isTotalStats, minAndMax, registerOnlyTotalRate, registerOnlyTotalSensor, registerPerStoreAndTotalSensor, registerSensor, registerSensor, registerSensor, registerSensor, registerSensorAttributeGauge, registerSensorIfAbsent, registerSensorIfAbsent, registerSensorIfAbsent, registerSensorWithAggregate, registerSensorWithAggregate, unregisterAllSensors
-
Constructor Details
-
ServerReadQuotaUsageStats
public ServerReadQuotaUsageStats(io.tehuti.metrics.MetricsRepository metricsRepository, String name) -
ServerReadQuotaUsageStats
-
-
Method Details
-
setCurrentVersion
public void setCurrentVersion(int version) -
setBackupVersion
public void setBackupVersion(int version) -
getCurrentVersion
public int getCurrentVersion() -
getBackupVersion
public int getBackupVersion() -
removeVersion
public void removeVersion(int version) -
recordAllowed
public void recordAllowed(int version, long rcu) - Parameters:
rcu
- The number of Read Capacity Units that the allowed request cost
-
recordRejected
public void recordRejected(int version, long rcu) - Parameters:
rcu
- The number of Read Capacity Units tha the rejected request would have cost
-
recordAllowedUnintentionally
public void recordAllowedUnintentionally(long rcu) -
setNodeQuotaResponsibility
public void setNodeQuotaResponsibility(int version, long nodeKpsResponsibility)
-