Enum Class VeniceRequestKeyCountBucket
java.lang.Object
java.lang.Enum<VeniceRequestKeyCountBucket>
com.linkedin.venice.stats.dimensions.VeniceRequestKeyCountBucket
- All Implemented Interfaces:
VeniceDimensionInterface,Serializable,Comparable<VeniceRequestKeyCountBucket>,Constable
public enum VeniceRequestKeyCountBucket
extends Enum<VeniceRequestKeyCountBucket>
implements VeniceDimensionInterface
Coarse buckets for request key count, used as an OTel dimension on CallTime metrics so that
SLOs can distinguish latency across batch sizes without blowing up cardinality with raw counts.
KEYS_LE_0 captures recordings that carry a non-positive key count — in practice the
-1 sentinel that server-side pre-parse errors emit when the request failed before its
key count could be parsed. Dashboards should filter this bucket out of SLO views since the
latency it represents is not tied to a real batch size.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionLarge batch: 1001 to 2000 keys inclusive.Medium batch: 151 to 500 keys inclusive.Small batch: 2 to 150 keys inclusive.Very large batch: 2001 to 5000 keys inclusive.Medium-large batch: 501 to 1000 keys inclusive.Single-key request (single-get, or a multiget / compute with exactly one key).Oversized batch: more than 5000 keys.Key count<= 0: pre-parse error sentinel (e.g., serverrequestKeyCount == -1). -
Method Summary
Modifier and TypeMethodDescriptionstatic VeniceRequestKeyCountBucketfromKeyCount(int keyCount) Single-get short-circuits in a single comparison.All instances of this Enum should have the same dimension name.static VeniceRequestKeyCountBucketReturns the enum constant of this class with the specified name.static VeniceRequestKeyCountBucket[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface com.linkedin.venice.stats.dimensions.VeniceDimensionInterface
getDimensionValue
-
Enum Constant Details
-
KEYS_LE_0
Key count<= 0: pre-parse error sentinel (e.g., serverrequestKeyCount == -1). -
KEYS_EQ_1
Single-key request (single-get, or a multiget / compute with exactly one key). -
KEYS_2_150
Small batch: 2 to 150 keys inclusive. -
KEYS_151_500
Medium batch: 151 to 500 keys inclusive. -
KEYS_501_1000
Medium-large batch: 501 to 1000 keys inclusive. -
KEYS_1001_2000
Large batch: 1001 to 2000 keys inclusive. -
KEYS_2001_5000
Very large batch: 2001 to 5000 keys inclusive. -
KEYS_GT_5000
Oversized batch: more than 5000 keys.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getDimensionName
All instances of this Enum should have the same dimension name. ReferVeniceDimensionInterface.getDimensionName()for more details.- Specified by:
getDimensionNamein interfaceVeniceDimensionInterface
-
fromKeyCount
Single-get short-circuits in a single comparison. Multi-key requests fall through to a balanced comparison tree. The non-positive sentinel falls through to the terminal return.
-