public class HighAvailabilityServicesUtils extends Object
HighAvailabilityServices
implementations.Modifier and Type | Class and Description |
---|---|
static class |
HighAvailabilityServicesUtils.AddressResolution
Enum specifying whether address resolution should be tried or not when creating the
HighAvailabilityServices . |
Constructor and Description |
---|
HighAvailabilityServicesUtils() |
Modifier and Type | Method and Description |
---|---|
static HighAvailabilityServices |
createAvailableOrEmbeddedServices(Configuration config,
Executor executor) |
static ClientHighAvailabilityServices |
createClientHAService(Configuration configuration) |
static HighAvailabilityServices |
createHighAvailabilityServices(Configuration configuration,
Executor executor,
HighAvailabilityServicesUtils.AddressResolution addressResolution) |
static Path |
getClusterHighAvailableStoragePath(Configuration configuration)
Gets the cluster high available storage path from the provided configuration.
|
static Tuple2<String,Integer> |
getJobManagerAddress(Configuration configuration)
Returns the JobManager's hostname and port extracted from the given
Configuration . |
static String |
getWebMonitorAddress(Configuration configuration,
HighAvailabilityServicesUtils.AddressResolution resolution)
Get address of web monitor from configuration.
|
public static HighAvailabilityServices createAvailableOrEmbeddedServices(Configuration config, Executor executor) throws Exception
Exception
public static HighAvailabilityServices createHighAvailabilityServices(Configuration configuration, Executor executor, HighAvailabilityServicesUtils.AddressResolution addressResolution) throws Exception
Exception
public static ClientHighAvailabilityServices createClientHAService(Configuration configuration) throws Exception
Exception
public static Tuple2<String,Integer> getJobManagerAddress(Configuration configuration) throws ConfigurationException
Configuration
.configuration
- Configuration to extract the JobManager's address fromConfigurationException
- if the JobManager's address cannot be extracted from the
configurationpublic static String getWebMonitorAddress(Configuration configuration, HighAvailabilityServicesUtils.AddressResolution resolution) throws UnknownHostException
configuration
- Configuration contains those for WebMonitor.resolution
- Whether to try address resolution of the given hostname or not. This allows
to fail fast in case that the hostname cannot be resolved.UnknownHostException
public static Path getClusterHighAvailableStoragePath(Configuration configuration)
The format is HA_STORAGE_PATH/HA_CLUSTER_ID
.
configuration
- containing the configuration valuesCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.