hqbhoho opened a new pull request, #7495:
URL: https://github.com/apache/gravitino/pull/7495
### What changes were proposed in this pull request?
Support pass custom http client config when using the Java Gravitino Client.
### Why are the changes needed?
- We can config connectionTimeout or socketTimeout and so on.
Fix: #7456
### Does this PR introduce _any_ user-facing change?
- support http client config
|config | default | Description |
| ----------- |----------- |----------- |
|gravitino.client.connectionTimeoutMs | null | An optional http connection
timeout in milliseconds|
|gravitino.client.socketTimeoutMs | null | 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();
```
### How was this patch tested?
original Uts
--
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]