java.lang.Object
org.elasticsearch.cluster.routing.allocation.DataTier
The
DataTier
class encapsulates the formalization of the "content",
"hot", "warm", and "cold" tiers as node roles. In contains the
roles themselves as well as helpers for validation and determining if a node
has a tier configured.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
This setting provider injects the setting allocating all newly created indices withindex.routing.allocation.include._tier_preference: "data_hot"
for a data stream index orindex.routing.allocation.include._tier_preference: "data_content"
for an index not part of a data stream unless the user overrides the setting while the index is being created (in a create index request for instance) -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
Compares the provided tiers for coldness order (eg.static String
getPreferredTiersConfiguration
(String targetTier) Based on the provided target tier it will return a comma separated list of preferred tiers.static Settings
getPreferredTiersConfigurationSettings
(String targetTier) static boolean
isColdNode
(DiscoveryNode discoveryNode) static boolean
isContentNode
(DiscoveryNode discoveryNode) static boolean
isFrozenNode
(Set<DiscoveryNodeRole> roles) static boolean
isFrozenNode
(DiscoveryNode discoveryNode) static boolean
isHotNode
(DiscoveryNode discoveryNode) static boolean
isWarmNode
(DiscoveryNode discoveryNode) parseTierList
(String tiers) static boolean
validTierName
(String tierName) Returns true if the given tier name is a valid tier
-
Field Details
-
DATA_CONTENT
- See Also:
-
DATA_HOT
- See Also:
-
DATA_WARM
- See Also:
-
DATA_COLD
- See Also:
-
DATA_FROZEN
- See Also:
-
ALL_DATA_TIERS
-
ENFORCE_DEFAULT_TIER_PREFERENCE
- See Also:
-
ENFORCE_DEFAULT_TIER_PREFERENCE_SETTING
-
TIER_PREFERENCE
- See Also:
-
TIER_PREFERENCE_SETTING
-
-
Constructor Details
-
DataTier
public DataTier()
-
-
Method Details
-
validTierName
Returns true if the given tier name is a valid tier -
getPreferredTiersConfiguration
Based on the provided target tier it will return a comma separated list of preferred tiers. ie. if `data_cold` is the target tier, it will return `data_cold,data_warm,data_hot`. This is usually used in conjunction withTIER_PREFERENCE_SETTING
. -
getPreferredTiersConfigurationSettings
-
isContentNode
-
isHotNode
-
isWarmNode
-
isColdNode
-
isFrozenNode
-
isFrozenNode
-
parseTierList
-
compare
Compares the provided tiers for coldness order (eg. warm is colder than hot). Similar toComparator.compare(Object, Object)
returns -1 if tier1 is colder than tier2 (ie. compare("data_cold", "data_hot")) 0 if tier1 is as cold as tier2 (ie. tier1.equals(tier2) ) 1 if tier1 is warmer than tier2 (ie. compare("data_hot", "data_cold")) The provided tiers parameters must be valid data tiers values (ie.ALL_DATA_TIERS
. NOTE: `data_content` is treated as "equal to data_hot" in the tiers hierarchy. If invalid tier names are passed the result is non-deterministic.
-