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


##########
core/src/main/java/org/apache/iceberg/rest/HTTPClient.java:
##########
@@ -448,6 +443,43 @@ static HttpRequestInterceptor loadInterceptorDynamically(
     return instance;
   }
 
+  static HttpClientConnectionManager getConnectionManager(
+      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 getConnectionConfig(Map<String, String> properties) {
+    Long connectionTimeout =
+        PropertyUtil.propertyAsNullableLong(properties, 
REST_CONNECTION_TIMEOUT);
+    Integer socketTimeout = PropertyUtil.propertyAsNullableInt(properties, 
REST_SOCKET_TIMEOUT);

Review Comment:
   SocketTimeout is an int type in the apache closeable httpclient whereas 
connection timeout is a long



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to