elkhand commented on code in PR #23406:
URL: https://github.com/apache/flink/pull/23406#discussion_r1332375725


##########
flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java:
##########
@@ -255,10 +266,22 @@ private RestClusterClient(
                 
RestClusterClientConfiguration.fromConfiguration(configuration);
         this.tempDir = tempDir;
 
+        this.customHttpHeaders =
+                ClientUtils.readHeadersFromEnvironmentVariable(
+                        ConfigConstants.FLINK_REST_CLIENT_HEADERS);
+        jobmanagerUrl =
+                new URL(
+                        
configuration.getBoolean(SecurityOptions.SSL_REST_ENABLED)
+                                ? "https"
+                                : "http",
+                        configuration.getString(JobManagerOptions.ADDRESS),
+                        configuration.getInteger(JobManagerOptions.PORT),
+                        configuration.getString(RestOptions.PATH));
+
         if (restClient != null) {
             this.restClient = restClient;
         } else {
-            this.restClient = new RestClient(configuration, executorService);
+            this.restClient = RestClient.forUrl(configuration, 
executorService, jobmanagerUrl);

Review Comment:
   Thanks @gaborgsomogyi .
   Added tests for jobmanagerUrl and customHeaders.
   cc: @mxm .



-- 
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-unsubscr...@flink.apache.org

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

Reply via email to