Enum HighAvailabilityMode
- All Implemented Interfaces:
Serializable,Comparable<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 -
Method Summary
Modifier and TypeMethodDescriptionstatic HighAvailabilityModefromConfig(org.apache.flink.configuration.Configuration config) Return the configuredHighAvailabilityMode.static booleanisHighAvailabilityModeActivated(org.apache.flink.configuration.Configuration configuration) Returns true if the defined recovery mode supports high availability.static HighAvailabilityModeReturns 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 Details
-
NONE
-
ZOOKEEPER
-
KUBERNETES
-
FACTORY_CLASS
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
Return the configuredHighAvailabilityMode.- Parameters:
config- The config to parse- Returns:
- Configured recovery mode or
NONEif not configured.
-
isHighAvailabilityModeActivated
public static boolean isHighAvailabilityModeActivated(org.apache.flink.configuration.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
-