You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "huwh (via GitHub)" <gi...@apache.org> on 2023/04/06 04:01:53 UTC

[GitHub] [flink] huwh commented on a diff in pull request #22308: [FLINK-31518][Runtime / REST] Fix StandaloneHaServices#getClusterRestEndpointLeaderRetreiver to return correct rest port

huwh commented on code in PR #22308:
URL: https://github.com/apache/flink/pull/22308#discussion_r1159255563


##########
flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/component/DefaultDispatcherResourceManagerComponentFactory.java:
##########
@@ -176,6 +176,10 @@ public DispatcherResourceManagerComponent create(
             log.debug("Starting Dispatcher REST endpoint.");
             webMonitorEndpoint.start();
 
+            configuration.setInteger(RestOptions.PORT, webMonitorEndpoint.getRestPort());
+            configuration.setString(

Review Comment:
   Do we need update this Address?
   
   "getServerAddress()" may produce NPE here.



##########
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/HighAvailabilityServicesUtils.java:
##########
@@ -128,11 +128,9 @@ public static HighAvailabilityServices createHighAvailabilityServices(
                                 RpcServiceUtils.createWildcardName(Dispatcher.DISPATCHER_NAME),
                                 addressResolution,
                                 configuration);
-                final String webMonitorAddress =
-                        getWebMonitorAddress(configuration, addressResolution);
 
                 return new StandaloneHaServices(
-                        resourceManagerRpcUrl, dispatcherRpcUrl, webMonitorAddress);
+                        resourceManagerRpcUrl, dispatcherRpcUrl, configuration);

Review Comment:
   Do we really need these change if you use ClientHighAvailabilityServices to retrieve the rest address and port?
   
    
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org