Package com.linkedin.venice.stats
Class ServerReadQuotaUsageStats
- java.lang.Object
-
- com.linkedin.venice.stats.AbstractVeniceStats
-
- com.linkedin.venice.stats.ServerReadQuotaUsageStats
-
public class ServerReadQuotaUsageStats extends AbstractVeniceStats
For measuring quota requests and rejections for a given store. Specifically not usingVeniceVersionedStats
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
Constructors Constructor Description ServerReadQuotaUsageStats(io.tehuti.metrics.MetricsRepository metricsRepository, java.lang.String name)
ServerReadQuotaUsageStats(io.tehuti.metrics.MetricsRepository metricsRepository, java.lang.String name, Time time)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBackupVersion()
int
getCurrentVersion()
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, getMetricsRepository, getName, getSensorFullName, getSensorFullName, isTotalStats, minAndMax, registerOnlyTotalRate, registerOnlyTotalSensor, registerPerStoreAndTotalSensor, registerSensor, registerSensor, registerSensor, registerSensor, registerSensorAttributeGauge, registerSensorIfAbsent, registerSensorIfAbsent, registerSensorIfAbsent, registerSensorWithAggregate, registerSensorWithAggregate, unregisterAllSensors
-
-
-
-
Constructor Detail
-
ServerReadQuotaUsageStats
public ServerReadQuotaUsageStats(io.tehuti.metrics.MetricsRepository metricsRepository, java.lang.String name)
-
ServerReadQuotaUsageStats
public ServerReadQuotaUsageStats(io.tehuti.metrics.MetricsRepository metricsRepository, java.lang.String name, Time time)
-
-
Method Detail
-
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)
-
-