[ 
https://issues.apache.org/jira/browse/FLINK-2288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14616782#comment-14616782
 ] 

ASF GitHub Bot commented on FLINK-2288:
---------------------------------------

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.


> Setup ZooKeeper for distributed coordination
> --------------------------------------------
>
>                 Key: FLINK-2288
>                 URL: https://issues.apache.org/jira/browse/FLINK-2288
>             Project: Flink
>          Issue Type: Sub-task
>          Components: JobManager, TaskManager
>            Reporter: Ufuk Celebi
>            Assignee: Ufuk Celebi
>             Fix For: 0.10
>
>
> Having standby JM instances for job manager high availabilty requires 
> distributed coordination between JM, TM, and clients. For this, we will use 
> ZooKeeper (ZK).
> Pros:
> - Proven solution (other projects use it for this as well)
> - Apache TLP with large community, docs, and library with required "recipies" 
> like leader election (see below)
> Related Wiki: 
> https://cwiki.apache.org/confluence/display/FLINK/JobManager+High+Availability



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to