Class LagDetector
java.lang.Object
org.elasticsearch.cluster.coordination.LagDetector
public class LagDetector
extends java.lang.Object
A publication can succeed and complete before all nodes have applied the published state and acknowledged it; however we need every node
eventually either to apply the published state (or a later state) or be removed from the cluster. This component achieves this by
removing any lagging nodes from the cluster after a timeout.
-
Field Summary
Fields Modifier and Type Field Description static Setting<org.elasticsearch.common.unit.TimeValue>
CLUSTER_FOLLOWER_LAG_TIMEOUT_SETTING
-
Constructor Summary
Constructors Constructor Description LagDetector(Settings settings, ThreadPool threadPool, java.util.function.Consumer<DiscoveryNode> onLagDetected, java.util.function.Supplier<DiscoveryNode> localNodeSupplier)
-
Method Summary
Modifier and Type Method Description void
clearTrackedNodes()
void
setAppliedVersion(DiscoveryNode discoveryNode, long appliedVersion)
void
setTrackedNodes(java.lang.Iterable<DiscoveryNode> discoveryNodes)
void
startLagDetector(long version)
java.lang.String
toString()
-
Field Details
-
CLUSTER_FOLLOWER_LAG_TIMEOUT_SETTING
public static final Setting<org.elasticsearch.common.unit.TimeValue> CLUSTER_FOLLOWER_LAG_TIMEOUT_SETTING
-
-
Constructor Details
-
LagDetector
public LagDetector(Settings settings, ThreadPool threadPool, java.util.function.Consumer<DiscoveryNode> onLagDetected, java.util.function.Supplier<DiscoveryNode> localNodeSupplier)
-
-
Method Details
-
setTrackedNodes
-
clearTrackedNodes
public void clearTrackedNodes() -
setAppliedVersion
-
startLagDetector
public void startLagDetector(long version) -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-