Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/886#discussion_r34045870
--- Diff:
flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
---
@@ -993,9 +1000,34 @@ object JobManager {
configuration.setString(ConfigConstants.FLINK_BASE_DIR_PATH_KEY,
configDir + "/..")
}
- val hostname =
configuration.getString(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY, null)
- val port =
configuration.getInteger(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY,
- ConfigConstants.DEFAULT_JOB_MANAGER_IPC_PORT)
+ // HA mode
+ val (hostname, port) = if
(ZooKeeperUtil.isJobManagerHighAvailabilityEnabled(configuration)) {
+ // TODO @removeme @tillrohrmann This is the place where the host and
random port for JM is
+ // chosen. For the FlinkMiniCluster you have to choose it on your
own.
+ LOG.info("HA mode.")
+
+ if (config.getHost == null) {
--- End diff --
In Scala it is actually recommended to call methods without parenthesis
which don't have side effects. This is due to the uniform access principle
which does not treat variable accesses and pure function calls differently.
Calling methods based on this principle is IMHO easier to understand than based
on which language the object was implemented. That would require that everyone
knows in which language an object is implemented which does not really scale.
---
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.
---