Package org.apache.pinot.spi.utils
Enum CommonConstants.Broker.AdaptiveServerSelector.Type
- java.lang.Object
-
- java.lang.Enum<CommonConstants.Broker.AdaptiveServerSelector.Type>
-
- org.apache.pinot.spi.utils.CommonConstants.Broker.AdaptiveServerSelector.Type
-
- All Implemented Interfaces:
Serializable,Comparable<CommonConstants.Broker.AdaptiveServerSelector.Type>,java.lang.constant.Constable
- Enclosing class:
- CommonConstants.Broker.AdaptiveServerSelector
public static enum CommonConstants.Broker.AdaptiveServerSelector.Type extends Enum<CommonConstants.Broker.AdaptiveServerSelector.Type>
Adaptive Server Selection feature has 2 parts: 1. Stats Collection 2. Routing Strategy Stats Collection is controlled by the config CONFIG_OF_ENABLE_STATS_COLLECTION. Routing Strategy is controlled by the config CONFIG_OF_TYPE. Stats Collection: Enabling/Disabling stats collection will dictate whether stats (like latency, # of inflight requests) will be collected when queries are routed to/received from servers. It does not have any impact on the Server Selection Strategy used. Routing Strategy: Decides what strategy should be used to pick a server. Note that this routing strategy complements the existing Balanced/ReplicaGroup/StrictReplicaGroup strategies and is not a replacement.The available strategies are as follows: 1. NO_OP: Uses the default behavior offered by Balanced/ReplicaGroup/StrictReplicaGroup instance selectors. Does NOT require Stats Collection to be enabled. 2. NUM_INFLIGHT_REQ: Picks the best server based on the number of inflight requests for each server. Requires Stats Collection to be enabled. 3. LATENCY: Picks the best server based on the Exponential Weighted Moving Averge of Latency for each server. Requires Stats Collection to be enabled. 4. HYBRID: Picks the best server by computing a custom hybrid score based on both latency and # inflight requests. This is based on the approach described in the paper https://www.usenix.org/system/files/conference/nsdi15/nsdi15-paper-suresh.pdf. Requires Stats Collection to be enabled.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description HYBRIDLATENCYNO_OPNUM_INFLIGHT_REQ
-
Method Summary
Modifier and Type Method Description static CommonConstants.Broker.AdaptiveServerSelector.TypevalueOf(String name)Returns the enum constant of this type with the specified name.static CommonConstants.Broker.AdaptiveServerSelector.Type[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NO_OP
public static final CommonConstants.Broker.AdaptiveServerSelector.Type NO_OP
-
NUM_INFLIGHT_REQ
public static final CommonConstants.Broker.AdaptiveServerSelector.Type NUM_INFLIGHT_REQ
-
LATENCY
public static final CommonConstants.Broker.AdaptiveServerSelector.Type LATENCY
-
HYBRID
public static final CommonConstants.Broker.AdaptiveServerSelector.Type HYBRID
-
-
Method Detail
-
values
public static CommonConstants.Broker.AdaptiveServerSelector.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CommonConstants.Broker.AdaptiveServerSelector.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
-