Class HighAvailabilityServicesUtils

    • Constructor Detail

      • HighAvailabilityServicesUtils

        public HighAvailabilityServicesUtils()
    • Method Detail

      • createAvailableOrEmbeddedServices

        public static HighAvailabilityServices createAvailableOrEmbeddedServices​(org.apache.flink.configuration.Configuration config,
                                                                                 Executor executor,
                                                                                 org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler)
                                                                          throws Exception
        Throws:
        Exception
      • createHighAvailabilityServices

        public static HighAvailabilityServices createHighAvailabilityServices​(org.apache.flink.configuration.Configuration configuration,
                                                                              Executor executor,
                                                                              org.apache.flink.runtime.rpc.AddressResolution addressResolution,
                                                                              org.apache.flink.runtime.rpc.RpcSystemUtils rpcSystemUtils,
                                                                              org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler)
                                                                       throws Exception
        Throws:
        Exception
      • createClientHAService

        public static ClientHighAvailabilityServices createClientHAService​(org.apache.flink.configuration.Configuration configuration,
                                                                           org.apache.flink.runtime.rpc.FatalErrorHandler fatalErrorHandler)
                                                                    throws Exception
        Throws:
        Exception
      • getJobManagerAddress

        public static org.apache.flink.api.java.tuple.Tuple2<String,​Integer> getJobManagerAddress​(org.apache.flink.configuration.Configuration configuration)
                                                                                                 throws org.apache.flink.util.ConfigurationException
        Returns the JobManager's hostname and port extracted from the given Configuration.
        Parameters:
        configuration - Configuration to extract the JobManager's address from
        Returns:
        The JobManager's hostname and port
        Throws:
        org.apache.flink.util.ConfigurationException - if the JobManager's address cannot be extracted from the configuration
      • getWebMonitorAddress

        public static String getWebMonitorAddress​(org.apache.flink.configuration.Configuration configuration,
                                                  org.apache.flink.runtime.rpc.AddressResolution resolution)
                                           throws UnknownHostException
        Get address of web monitor from configuration.
        Parameters:
        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.
        Returns:
        Address of WebMonitor.
        Throws:
        UnknownHostException
      • getClusterHighAvailableStoragePath

        public static org.apache.flink.core.fs.Path getClusterHighAvailableStoragePath​(org.apache.flink.configuration.Configuration configuration)
        Gets the cluster high available storage path from the provided configuration.

        The format is HA_STORAGE_PATH/HA_CLUSTER_ID.

        Parameters:
        configuration - containing the configuration values
        Returns:
        Path under which all highly available cluster artifacts are being stored