Class ClusterFormationFailureHelper

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

public class ClusterFormationFailureHelper extends Object
Handles periodic debug logging of information regarding why the cluster has failed to form. Periodic logging begins once start() is called, and ceases on stop().
  • Field Details

    • DISCOVERY_CLUSTER_FORMATION_WARNING_TIMEOUT_SETTING

      public static final Setting<TimeValue> DISCOVERY_CLUSTER_FORMATION_WARNING_TIMEOUT_SETTING
      This time period controls how often warning log messages will be written if this node fails to join or form a cluster.
  • Constructor Details

    • ClusterFormationFailureHelper

      public ClusterFormationFailureHelper(Settings settings, Supplier<ClusterFormationFailureHelper.ClusterFormationState> clusterFormationStateSupplier, ThreadPool threadPool, Runnable logLastFailedJoinAttempt)
      Works with the JoinHelper to log the latest node-join attempt failure and cluster state debug information. Must call start() to begin.
      Parameters:
      settings - provides the period in which to log cluster formation errors.
      clusterFormationStateSupplier - information about the current believed cluster state (See ClusterFormationFailureHelper.ClusterFormationState)
      threadPool - the thread pool on which to run debug logging
      logLastFailedJoinAttempt - invokes an instance of the JoinHelper to log the last encountered join failure (See JoinHelper.logLastFailedJoinAttempt())
  • Method Details

    • isRunning

      public boolean isRunning()
    • start

      public void start()
      Schedules a warning debug message to be logged in 'clusterFormationWarningTimeout' time, and periodically thereafter, until stop() has been called.
    • stop

      public void stop()