yuqi1129 commented on code in PR #7495: URL: https://github.com/apache/gravitino/pull/7495#discussion_r2215407778
########## docs/how-to-use-java-client.md: ########## @@ -0,0 +1,45 @@ +--- +title: "How to use Apache Gravitino Java client" +slug: /how-to-use-gravitino-java-client +date: 2025-07-09 Review Comment: Do you have any idea where we should put this doc on the web page? I mean which sidebar folder should we put it in. <img width="487" height="877" alt="image" src="https://github.com/user-attachments/assets/38055bf6-3f77-4d0a-857b-d7e45e34bd7c" /> ########## docs/how-to-use-java-client.md: ########## @@ -0,0 +1,45 @@ +--- +title: "How to use Apache Gravitino Java client" +slug: /how-to-use-gravitino-java-client +date: 2025-07-09 +keyword: Gravitino Java client +license: This software is licensed under the Apache License version 2. +--- + +## Introduction + +You can use Gravitino Java client library with Spark, Spring and other Java environment. + +First of all, You must have a Gravitino server set up and run, You can refer document of How to install Gravitino to build Gravitino server from source code and install it in your local. Review Comment: `How to install Gravitino to build Gravitino...` should add hyperlink, or you shouldn't capitalize the word `How`. ########## 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: Why do we use the type `long` for connection timeout and `integer` for socket timeout? -- 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]
