Class JoinReasonService

java.lang.Object
org.elasticsearch.cluster.coordination.JoinReasonService

public class JoinReasonService extends Object
Tracks nodes that were recently in the cluster, and uses this information to give extra details if these nodes rejoin the cluster.
  • Constructor Details

    • JoinReasonService

      public JoinReasonService(LongSupplier relativeTimeInMillisSupplier)
  • Method Details

    • onClusterStateApplied

      public void onClusterStateApplied(DiscoveryNodes discoveryNodes)
      Called when a new cluster state was applied by a master-eligible node, possibly adding or removing some nodes.
    • onNodeRemoved

      public void onNodeRemoved(DiscoveryNode discoveryNode, String reason)
      Called on the master when a node-left task completes successfully and after the resulting cluster state is applied. If the absent node is still tracked then this adds the removal reason (disconnected, lagging, etc.) to the tracker.
    • getJoinReason

      public String getJoinReason(DiscoveryNode discoveryNode, Coordinator.Mode currentMode)
      Parameters:
      discoveryNode - The joining node.
      currentMode - The current mode of the master that the node is joining.
      Returns:
      A description of the reason for the join, possibly including some details of its earlier removal.