config.setInteger(RestOptions.PORT, 0); final RpcService rpcService = AkkaRpcServiceUtils.createRpcService("localhost", 0, config); final int jobManagerPort = rpcService.getPort(); config.setInteger(JobManagerOptions.PORT, jobManagerPort);
FatalErrorHandler fatalErrorHandler) { super(rpcService, AkkaRpcServiceUtils.createRandomName(TASK_MANAGER_NAME));
/** * Utility method to create RPC service from configuration and hostname, port. * * @param hostname The hostname/address that describes the TaskManager's data location. * @param portRangeDefinition The port range to start TaskManager on. * @param configuration The configuration for the TaskManager. * @return The rpc service which is used to start and connect to the TaskManager RpcEndpoint . * @throws IOException Thrown, if the actor system can not bind to the address * @throws Exception Thrown is some other error occurs while creating akka actor system */ public static RpcService createRpcService( String hostname, String portRangeDefinition, Configuration configuration) throws Exception { final ActorSystem actorSystem = BootstrapTools.startActorSystem(configuration, hostname, portRangeDefinition, LOG); return instantiateAkkaRpcService(configuration, actorSystem); }
ClassLoader userCodeLoader) throws Exception { super(rpcService, AkkaRpcServiceUtils.createRandomName(JobMaster.JOB_MANAGER_NAME));
/** * Utility method to create RPC service from configuration and hostname, port. * * @param hostname The hostname/address that describes the TaskManager's data location. * @param portRangeDefinition The port range to start TaskManager on. * @param configuration The configuration for the TaskManager. * @return The rpc service which is used to start and connect to the TaskManager RpcEndpoint . * @throws IOException Thrown, if the actor system can not bind to the address * @throws Exception Thrown is some other error occurs while creating akka actor system */ public static RpcService createRpcService( String hostname, String portRangeDefinition, Configuration configuration) throws Exception { final ActorSystem actorSystem = BootstrapTools.startActorSystem(configuration, hostname, portRangeDefinition, LOG); return instantiateAkkaRpcService(configuration, actorSystem); }
/** * 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); }
config.setInteger(TaskManagerOptions.NUM_TASK_SLOTS, 2); final RpcService rpcService = AkkaRpcServiceUtils.createRpcService("localhost", 0, config);
FatalErrorHandler fatalErrorHandler) { super(rpcService, AkkaRpcServiceUtils.createRandomName(TASK_MANAGER_NAME));
/** * Utility method to create RPC service from configuration and hostname, port. * * @param hostname The hostname/address that describes the TaskManager's data location. * @param port If true, the TaskManager will not initiate the TCP network stack. * @param configuration The configuration for the TaskManager. * @return The rpc service which is used to start and connect to the TaskManager RpcEndpoint . * @throws IOException Thrown, if the actor system can not bind to the address * @throws Exception Thrown is some other error occurs while creating akka actor system */ public static RpcService createRpcService( String hostname, int port, Configuration configuration) throws Exception { final ActorSystem actorSystem = BootstrapTools.startActorSystem(configuration, hostname, port, LOG); return instantiateAkkaRpcService(configuration, actorSystem); }
/** * 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); }
@Nonnull private RpcService createRpcService(Configuration configuration, String bindAddress, String portRange) throws Exception { return AkkaRpcServiceUtils.createRpcService(bindAddress, portRange, configuration); }
ClassLoader userCodeLoader) throws Exception { super(rpcService, AkkaRpcServiceUtils.createRandomName(JOB_MANAGER_NAME));
/** * Utility method to create RPC service from configuration and hostname, port. * * @param hostname The hostname/address that describes the TaskManager's data location. * @param port If true, the TaskManager will not initiate the TCP network stack. * @param configuration The configuration for the TaskManager. * @return The rpc service which is used to start and connect to the TaskManager RpcEndpoint . * @throws IOException Thrown, if the actor system can not bind to the address * @throws Exception Thrown is some other error occurs while creating akka actor system */ public static RpcService createRpcService( String hostname, int port, Configuration configuration) throws Exception { final ActorSystem actorSystem = BootstrapTools.startActorSystem(configuration, hostname, port, LOG); return instantiateAkkaRpcService(configuration, actorSystem); }
/** * 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); }
@Nonnull private RpcService createRpcService(Configuration configuration, String bindAddress, String portRange) throws Exception { return AkkaRpcServiceUtils.createRpcService(bindAddress, portRange, configuration); }
ClassLoader userCodeLoader) throws Exception { super(rpcService, AkkaRpcServiceUtils.createRandomName(JOB_MANAGER_NAME));
/** * 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); }
return AkkaRpcServiceUtils.createRpcService(taskManagerHostname, portRangeDefinition, configuration);
SubmittedJobGraphStore submittedJobGraphStore) throws Exception { super(rpcService, AkkaRpcServiceUtils.createRandomName(JOB_MANAGER_NAME));