public enum HighAvailabilityMode extends Enum<HighAvailabilityMode>
- 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 and Description |
---|
FACTORY_CLASS |
NONE |
ZOOKEEPER |
Modifier and Type | Method and Description |
---|---|
static HighAvailabilityMode |
fromConfig(Configuration config)
Return the configured
HighAvailabilityMode . |
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.
|
public static final HighAvailabilityMode NONE
public static final HighAvailabilityMode ZOOKEEPER
public static final HighAvailabilityMode FACTORY_CLASS
public static HighAvailabilityMode[] values()
for (HighAvailabilityMode c : HighAvailabilityMode.values()) System.out.println(c);
public static HighAvailabilityMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static HighAvailabilityMode fromConfig(Configuration config)
HighAvailabilityMode
.config
- The config to parseNONE
if not configured.public static boolean isHighAvailabilityModeActivated(Configuration configuration)
configuration
- Configuration which contains the recovery modeCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.