Enum HighAvailabilityMode
- java.lang.Object
-
- java.lang.Enum<HighAvailabilityMode>
-
- org.apache.flink.runtime.jobmanager.HighAvailabilityMode
-
- All Implemented Interfaces:
Serializable
,Comparable<HighAvailabilityMode>
public enum HighAvailabilityMode extends Enum<HighAvailabilityMode>
High availability mode for Flink's cluster execution. Currently supported modes are:- NONE: No high availability. - ZooKeeper: JobManager high availability via ZooKeeper ZooKeeper is used to select a leader among a group of JobManager. This JobManager is responsible for the job execution. Upon failure of the leader a new leader is elected which will take over the responsibilities of the old leader - FACTORY_CLASS: Use implementation of
HighAvailabilityServicesFactory
specified in configuration property high-availability
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FACTORY_CLASS
KUBERNETES
NONE
ZOOKEEPER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HighAvailabilityMode
fromConfig(Configuration config)
Return the configuredHighAvailabilityMode
.static boolean
isHighAvailabilityModeActivated(Configuration configuration)
Returns true if the defined recovery mode supports high availability.static HighAvailabilityMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static HighAvailabilityMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final HighAvailabilityMode NONE
-
ZOOKEEPER
public static final HighAvailabilityMode ZOOKEEPER
-
KUBERNETES
public static final HighAvailabilityMode KUBERNETES
-
FACTORY_CLASS
public static final HighAvailabilityMode FACTORY_CLASS
-
-
Method Detail
-
values
public static HighAvailabilityMode[] 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 (HighAvailabilityMode c : HighAvailabilityMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HighAvailabilityMode 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
-
fromConfig
public static HighAvailabilityMode fromConfig(Configuration config)
Return the configuredHighAvailabilityMode
.- Parameters:
config
- The config to parse- Returns:
- Configured recovery mode or
NONE
if not configured.
-
isHighAvailabilityModeActivated
public static boolean isHighAvailabilityModeActivated(Configuration configuration)
Returns true if the defined recovery mode supports high availability.- Parameters:
configuration
- Configuration which contains the recovery mode- Returns:
- true if high availability is supported by the recovery mode, otherwise false
-
-