Enum SupervisorStateManager.BasicState
- java.lang.Object
-
- java.lang.Enum<SupervisorStateManager.BasicState>
-
- org.apache.druid.indexing.overlord.supervisor.SupervisorStateManager.BasicState
-
- All Implemented Interfaces:
Serializable,Comparable<SupervisorStateManager.BasicState>,SupervisorStateManager.State
- Enclosing class:
- SupervisorStateManager
public static enum SupervisorStateManager.BasicState extends Enum<SupervisorStateManager.BasicState> implements SupervisorStateManager.State
-
-
Enum Constant Summary
Enum Constants Enum Constant Description IDLEPENDINGRUNNINGSTOPPINGSUSPENDEDUNHEALTHY_SUPERVISORUNHEALTHY_TASKS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisFirstRunOnly()It may be helpful to provide more detailed state information (e.g.booleanisHealthy()If we are in this state, is the supervisor healthy or unhealthy?static SupervisorStateManager.BasicStatevalueOf(String name)Returns the enum constant of this type with the specified name.static SupervisorStateManager.BasicState[]values()Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface org.apache.druid.indexing.overlord.supervisor.SupervisorStateManager.State
getBasicState
-
-
-
-
Enum Constant Detail
-
UNHEALTHY_SUPERVISOR
public static final SupervisorStateManager.BasicState UNHEALTHY_SUPERVISOR
-
UNHEALTHY_TASKS
public static final SupervisorStateManager.BasicState UNHEALTHY_TASKS
-
PENDING
public static final SupervisorStateManager.BasicState PENDING
-
RUNNING
public static final SupervisorStateManager.BasicState RUNNING
-
IDLE
public static final SupervisorStateManager.BasicState IDLE
-
SUSPENDED
public static final SupervisorStateManager.BasicState SUSPENDED
-
STOPPING
public static final SupervisorStateManager.BasicState STOPPING
-
-
Method Detail
-
values
public static SupervisorStateManager.BasicState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SupervisorStateManager.BasicState c : SupervisorStateManager.BasicState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SupervisorStateManager.BasicState valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isHealthy
public boolean isHealthy()
Description copied from interface:SupervisorStateManager.StateIf we are in this state, is the supervisor healthy or unhealthy?- Specified by:
isHealthyin interfaceSupervisorStateManager.State
-
isFirstRunOnly
public boolean isFirstRunOnly()
Description copied from interface:SupervisorStateManager.StateIt may be helpful to provide more detailed state information (e.g. CONNECTING_TO_STREAM, CREATING_TASKS, etc.) during the first run of the supervisor so that if the supervisor is unable to complete the run, we have information about what stage it was in when it failed. Once the supervisor is stable, we may not be as concerned about all the stages it cycles through, and just want to know if it's healthy or unhealthy. This flag indicates if the state should only be accepted prior to having completed a successful run.- Specified by:
isFirstRunOnlyin interfaceSupervisorStateManager.State
-
-