Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/3391#discussion_r104122545
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/BootstrapTools.java
---
@@ -174,36 +152,28 @@ public static ActorSystem startActorSystem(
public static WebMonitor startWebMonitorIfConfigured(
Configuration config,
ActorSystem actorSystem,
- ActorRef jobManager,
Logger logger) throws Exception {
-
// this ensures correct values are present in the web frontend
final Address address = AkkaUtils.getAddress(actorSystem);
config.setString(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY,
address.host().get());
config.setString(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY,
address.port().get().toString());
- if (config.getInteger(ConfigConstants.JOB_MANAGER_WEB_PORT_KEY,
0) >= 0) {
- logger.info("Starting JobManager Web Frontend");
+ logger.info("Starting JobManager Web Frontend");
- LeaderRetrievalService leaderRetrievalService =
-
LeaderRetrievalUtils.createLeaderRetrievalService(config, jobManager);
+ LeaderRetrievalService leaderRetrievalService =
+
LeaderRetrievalUtils.createLeaderRetrievalService(config);
- // start the web frontend. we need to load this
dynamically
- // because it is not in the same project/dependencies
- WebMonitor monitor =
WebMonitorUtils.startWebRuntimeMonitor(
- config, leaderRetrievalService, actorSystem);
+ // start the web frontend. we need to load this dynamically
+ // because it is not in the same project/dependencies
+ WebMonitor monitor = WebMonitorUtils.startWebRuntimeMonitor(
+ config, leaderRetrievalService, actorSystem);
- // start the web monitor
- if (monitor != null) {
- String jobManagerAkkaURL =
AkkaUtils.getAkkaURL(actorSystem, jobManager);
- monitor.start(jobManagerAkkaURL);
- }
- return monitor;
- }
- else {
- return null;
+ if (monitor != null) {
+
monitor.start(JobManager.getRemoteJobManagerAkkaURL(config));
--- End diff --
I think it is not a good idea to bake in the constraint in this method that
the `JobManager` always have to be started under the same actor name. This is
brittle and I think it would be better to pass in the JobManager's actor name
to the method.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---