/** * Creates a {@link StandaloneLeaderRetrievalService} form the given configuration and the * JobManager name. The host and port for the remote Akka URL are retrieved from the provided * configuration. Instead of using the standard JobManager Akka name, the provided one is used * for the remote Akka URL. * * @param configuration Configuration instance containing hte host and port information * @param resolveInitialHostName If true, resolves the hostname of the StandaloneLeaderRetrievalService * @param jobManagerName Name of the JobManager actor * @return StandaloneLeaderRetrievalService * @throws ConfigurationException if the job manager address cannot be retrieved from the configuration * @throws UnknownHostException if the job manager address cannot be resolved */ public static StandaloneLeaderRetrievalService createLeaderRetrievalService( Configuration configuration, boolean resolveInitialHostName, String jobManagerName) throws ConfigurationException, UnknownHostException { Tuple2<String, Integer> hostnamePort = HighAvailabilityServicesUtils.getJobManagerAddress(configuration); String jobManagerAkkaUrl = AkkaRpcServiceUtils.getRpcUrl( hostnamePort.f0, hostnamePort.f1, jobManagerName != null ? jobManagerName : JobMaster.JOB_MANAGER_NAME, resolveInitialHostName ? AddressResolution.TRY_ADDRESS_RESOLUTION : AddressResolution.NO_ADDRESS_RESOLUTION, configuration); return new StandaloneLeaderRetrievalService(jobManagerAkkaUrl); }
/** * Creates a {@link StandaloneLeaderRetrievalService} form the given configuration and the * JobManager name. The host and port for the remote Akka URL are retrieved from the provided * configuration. Instead of using the standard JobManager Akka name, the provided one is used * for the remote Akka URL. * * @param configuration Configuration instance containing hte host and port information * @param resolveInitialHostName If true, resolves the hostname of the StandaloneLeaderRetrievalService * @param jobManagerName Name of the JobManager actor * @return StandaloneLeaderRetrievalService * @throws ConfigurationException if the job manager address cannot be retrieved from the configuration * @throws UnknownHostException if the job manager address cannot be resolved */ public static StandaloneLeaderRetrievalService createLeaderRetrievalService( Configuration configuration, boolean resolveInitialHostName, String jobManagerName) throws ConfigurationException, UnknownHostException { Tuple2<String, Integer> hostnamePort = HighAvailabilityServicesUtils.getJobManagerAddress(configuration); String jobManagerAkkaUrl = AkkaRpcServiceUtils.getRpcUrl( hostnamePort.f0, hostnamePort.f1, jobManagerName != null ? jobManagerName : JobMaster.JOB_MANAGER_NAME, resolveInitialHostName ? AddressResolution.TRY_ADDRESS_RESOLUTION : AddressResolution.NO_ADDRESS_RESOLUTION, configuration); return new StandaloneLeaderRetrievalService(jobManagerAkkaUrl); }
/** * Creates a {@link StandaloneLeaderRetrievalService} form the given configuration and the * JobManager name. The host and port for the remote Akka URL are retrieved from the provided * configuration. Instead of using the standard JobManager Akka name, the provided one is used * for the remote Akka URL. * * @param configuration Configuration instance containing hte host and port information * @param resolveInitialHostName If true, resolves the hostname of the StandaloneLeaderRetrievalService * @param jobManagerName Name of the JobManager actor * @return StandaloneLeaderRetrievalService * @throws ConfigurationException if the job manager address cannot be retrieved from the configuration * @throws UnknownHostException if the job manager address cannot be resolved */ public static StandaloneLeaderRetrievalService createLeaderRetrievalService( Configuration configuration, boolean resolveInitialHostName, String jobManagerName) throws ConfigurationException, UnknownHostException { Tuple2<String, Integer> hostnamePort = HighAvailabilityServicesUtils.getJobManagerAddress(configuration); String jobManagerAkkaUrl = AkkaRpcServiceUtils.getRpcUrl( hostnamePort.f0, hostnamePort.f1, jobManagerName != null ? jobManagerName : JobMaster.JOB_MANAGER_NAME, resolveInitialHostName ? AddressResolution.TRY_ADDRESS_RESOLUTION : AddressResolution.NO_ADDRESS_RESOLUTION, configuration); return new StandaloneLeaderRetrievalService(jobManagerAkkaUrl); }
/** * Creates a {@link StandaloneLeaderRetrievalService} form the given configuration and the * JobManager name. The host and port for the remote Akka URL are retrieved from the provided * configuration. Instead of using the standard JobManager Akka name, the provided one is used * for the remote Akka URL. * * @param configuration Configuration instance containing hte host and port information * @param resolveInitialHostName If true, resolves the hostname of the StandaloneLeaderRetrievalService * @param jobManagerName Name of the JobManager actor * @return StandaloneLeaderRetrievalService * @throws ConfigurationException if the job manager address cannot be retrieved from the configuration * @throws UnknownHostException if the job manager address cannot be resolved */ public static StandaloneLeaderRetrievalService createLeaderRetrievalService( Configuration configuration, boolean resolveInitialHostName, String jobManagerName) throws ConfigurationException, UnknownHostException { Tuple2<String, Integer> hostnamePort = HighAvailabilityServicesUtils.getJobManagerAddress(configuration); String jobManagerAkkaUrl = AkkaRpcServiceUtils.getRpcUrl( hostnamePort.f0, hostnamePort.f1, jobManagerName != null ? jobManagerName : JobMaster.JOB_MANAGER_NAME, resolveInitialHostName ? AddressResolution.TRY_ADDRESS_RESOLUTION : AddressResolution.NO_ADDRESS_RESOLUTION, configuration); return new StandaloneLeaderRetrievalService(jobManagerAkkaUrl); }
final Tuple2<String, Integer> hostnamePort = getJobManagerAddress(configuration);
case NONE: case FILESYSTEM: final Tuple2<String, Integer> hostnamePort = getJobManagerAddress(configuration);
final Tuple2<String, Integer> hostnamePort = getJobManagerAddress(configuration);
final Tuple2<String, Integer> hostnamePort = getJobManagerAddress(configuration);