hqbhoho commented on code in PR #7495:
URL: https://github.com/apache/gravitino/pull/7495#discussion_r2215477777
##########
clients/client-java/src/main/java/org/apache/gravitino/client/HTTPClient.java:
##########
@@ -701,14 +713,48 @@ public static Builder builder(Map<String, String>
properties) {
return new Builder(properties);
}
+ private static HttpClientConnectionManager configureConnectionManager(
+ Map<String, String> properties) {
+ PoolingHttpClientConnectionManagerBuilder connectionManagerBuilder =
+ PoolingHttpClientConnectionManagerBuilder.create();
+ ConnectionConfig connectionConfig = configureConnectionConfig(properties);
+ if (connectionConfig != null) {
+ connectionManagerBuilder.setDefaultConnectionConfig(connectionConfig);
+ }
+ return connectionManagerBuilder.build();
+ }
+
+ @VisibleForTesting
+ static ConnectionConfig configureConnectionConfig(Map<String, String>
properties) {
+ Long connectionTimeoutMillis =
+ MapUtils.propertyAsNullableLong(properties,
CLIENT_CONNECTION_TIMEOUT_MS);
+ Integer socketTimeoutMillis =
Review Comment:
We can use `long` with socket timeout if necessary. `Timeout.of` only need
`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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]