hqbhoho opened a new pull request, #7805:
URL: https://github.com/apache/gravitino/pull/7805

   ### What changes were proposed in this pull request?
   Support pass custom client config when using the Gravitino Client.
   
   ### Why are the changes needed?
   
   We can config connectionTimeout or socketTimeout and so on.
   
   Fix: #7546
   Fix: #7670
   
   ### Does this PR introduce _any_ user-facing change?
   #### Java client
   - support http client config
   
   |config      | default | Description |
   | ----------- |----------- |----------- |
   |gravitino.client.connectionTimeoutMs |180000  | An optional http connection 
timeout in milliseconds|
   |gravitino.client.socketTimeoutMs | 180000 | An optional http socket timeout 
in milliseconds |
   
   - add `withClientConfig` in 
`org.apache.gravitino.client.GravitinoClientBase.Builder`
   ```
    Map<String, String> properties =
           ImmutableMap.of(
               "gravitino.client.connectionTimeoutMs", "10", 
               "gravitino.client.socketTimeoutMs", "10"
           );
               
   GravitinoClient.builder("uri")
   .withMetalake("metalake")
   .withClientConfig(properties) // add custom client config (optional)
   .builder(); 
   
   GravitinoAdminClient.builder("uri")
   .withClientConfig(properties) // add custom client config (optional)
   .builder();            
   ```
   #### Python client
   - add `timeout` in `GravitinoClientBase`
   - add `client_request_timeout` in  `GVFSConfig`
   
   ### How was this patch tested?
   local tests.
   


-- 
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]

Reply via email to