nastra commented on code in PR #10053:
URL: https://github.com/apache/iceberg/pull/10053#discussion_r1547287086


##########
core/src/main/java/org/apache/iceberg/rest/HTTPClient.java:
##########
@@ -448,6 +446,47 @@ static HttpRequestInterceptor loadInterceptorDynamically(
     return instance;
   }
 
+  static HttpClientConnectionManager configureConnectionManager(
+      Map<String, String> properties, ConnectionConfig connectionConfig) {
+    PoolingHttpClientConnectionManagerBuilder connectionManagerBuilder =
+        PoolingHttpClientConnectionManagerBuilder.create();
+
+    if (connectionConfig != null) {
+      connectionManagerBuilder.setDefaultConnectionConfig(connectionConfig);
+    }
+
+    return connectionManagerBuilder
+        .useSystemProperties()
+        .setMaxConnTotal(Integer.getInteger(REST_MAX_CONNECTIONS, 
REST_MAX_CONNECTIONS_DEFAULT))
+        .setMaxConnPerRoute(
+            PropertyUtil.propertyAsInt(
+                properties, REST_MAX_CONNECTIONS_PER_ROUTE, 
REST_MAX_CONNECTIONS_PER_ROUTE_DEFAULT))
+        .build();
+  }
+
+  @VisibleForTesting
+  static ConnectionConfig configureConnectionConfig(Map<String, String> 
properties) {
+    Long connectionTimeout =

Review Comment:
   ```suggestion
       Long connectionTimeoutMillis =
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to