public class HighAvailabilityServicesUtils extends Object
HighAvailabilityServices
implementations.Constructor and Description |
---|
HighAvailabilityServicesUtils() |
Modifier and Type | Method and Description |
---|---|
static HighAvailabilityServices |
createAvailableOrEmbeddedServices(Configuration config,
Executor executor,
FatalErrorHandler fatalErrorHandler) |
static ClientHighAvailabilityServices |
createClientHAService(Configuration configuration,
FatalErrorHandler fatalErrorHandler) |
static HighAvailabilityServices |
createHighAvailabilityServices(Configuration configuration,
Executor executor,
AddressResolution addressResolution,
RpcSystemUtils rpcSystemUtils,
FatalErrorHandler fatalErrorHandler) |
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,
AddressResolution resolution)
Get address of web monitor from configuration.
|
public static HighAvailabilityServices createAvailableOrEmbeddedServices(Configuration config, Executor executor, FatalErrorHandler fatalErrorHandler) throws Exception
Exception
public static HighAvailabilityServices createHighAvailabilityServices(Configuration configuration, Executor executor, AddressResolution addressResolution, RpcSystemUtils rpcSystemUtils, FatalErrorHandler fatalErrorHandler) throws Exception
Exception
public static ClientHighAvailabilityServices createClientHAService(Configuration configuration, FatalErrorHandler fatalErrorHandler) 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, 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–2024 The Apache Software Foundation. All rights reserved.