Class SupervisorStateManager

java.lang.Object
org.apache.druid.indexing.overlord.supervisor.SupervisorStateManager

public class SupervisorStateManager extends Object
  • Constructor Details

  • Method Details

    • maybeSetState

      public void maybeSetState(SupervisorStateManager.State proposedState)
      Certain states are only valid if the supervisor hasn't had a successful iteration. This method checks if there's been at least one successful iteration, and if applicable, sets supervisor state to an appropriate new state. A STOPPING supervisor cannot transition to any other state as this state is final. This method must be thread-safe as multiple threads trying to update may lead to an invalid state.
    • recordThrowableEvent

      public void recordThrowableEvent(Throwable t)
    • recordCompletedTaskState

      public void recordCompletedTaskState(TaskState state)
    • markRunFinished

      public void markRunFinished()
    • getExceptionEvents

      public List<SupervisorStateManager.ExceptionEvent> getExceptionEvents()
    • getSupervisorState

      public SupervisorStateManager.State getSupervisorState()
    • isHealthy

      public boolean isHealthy()
    • isSteadyState

      public boolean isSteadyState()
    • isAtLeastOneSuccessfulRun

      public boolean isAtLeastOneSuccessfulRun()
    • isIdle

      public boolean isIdle()
    • getRecentEventsQueue

      protected Deque<SupervisorStateManager.ExceptionEvent> getRecentEventsQueue()
    • isStoreStackTrace

      protected boolean isStoreStackTrace()
    • getSpecificUnhealthySupervisorState

      protected SupervisorStateManager.State getSpecificUnhealthySupervisorState()
    • buildExceptionEvent

      protected SupervisorStateManager.ExceptionEvent buildExceptionEvent(Throwable t)