Class AutoExpandReplicas
- java.lang.Object
-
- org.elasticsearch.cluster.metadata.AutoExpandReplicas
-
public final class AutoExpandReplicas extends java.lang.Object
This class acts as a functional wrapper around theindex.auto_expand_replicas
setting. This setting or rather it's value is expanded into a min and max value which requires special handling based on the number of datanodes in the cluster. This class handles all the parsing and streamlines the access to these values.
-
-
Field Summary
Fields Modifier and Type Field Description static Setting<AutoExpandReplicas>
SETTING
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.Integer,java.util.List<java.lang.String>>
getAutoExpandReplicaChanges(MetaData metaData, DiscoveryNodes discoveryNodes)
Checks if the are replicas with the auto-expand feature that need to be adapted.java.lang.String
toString()
-
-
-
Field Detail
-
SETTING
public static final Setting<AutoExpandReplicas> SETTING
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getAutoExpandReplicaChanges
public static java.util.Map<java.lang.Integer,java.util.List<java.lang.String>> getAutoExpandReplicaChanges(MetaData metaData, DiscoveryNodes discoveryNodes)
Checks if the are replicas with the auto-expand feature that need to be adapted. Returns a map of updates, which maps the indices to be updated to the desired number of replicas. The map has the desired number of replicas as key and the indices to update as value, as this allows the result of this method to be directly applied to RoutingTable.Builder#updateNumberOfReplicas.
-
-