Github user mxm commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2085#discussion_r66805960
  
    --- Diff: 
flink-clients/src/main/java/org/apache/flink/client/program/ClusterClient.java 
---
    @@ -181,11 +198,30 @@ public boolean getPrintStatusDuringExecution() {
        }
     
        /**
    -    * @return -1 if unknown. The maximum number of available processing 
slots at the Flink cluster
    -    * connected to this client.
    +    * Gets the current JobManager address from the Flink configuration 
(may change in case of a HA setup).
    +    * @return The address (host and port) of the leading JobManager
         */
    -   public int getMaxSlots() {
    -           return this.maxSlots;
    +   public InetSocketAddress getJobManagerAddressFromConfig() {
    +           try {
    +           String hostName = 
flinkConfig.getString(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY, null);
    +           int port = 
flinkConfig.getInteger(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY, -1);
    +           return new InetSocketAddress(hostName, port);
    --- End diff --
    
    Fixed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to