rdblue commented on code in PR #4495:
URL: https://github.com/apache/iceberg/pull/4495#discussion_r842968111
##########
core/src/main/java/org/apache/iceberg/rest/RESTCatalog.java:
##########
@@ -405,4 +435,23 @@ private String fullTableName(TableIdentifier ident) {
return Pair.of(tableClient, tableIO);
}
+
+ private Map<String, String> fetchAndMergeWithServerConf(Map<String, String>
props) {
+ // Create a client for one time use, as we will reconfigure the client
using the merged server and application
+ // defined configuration.
+ RESTClient singleUseClient = clientBuilder.apply(props);
+
+ try {
+ RESTCatalogConfigResponse configResponse = singleUseClient
+ .get(ResourcePaths.config(), RESTCatalogConfigResponse.class,
ErrorHandlers.defaultErrorHandler());
+ configResponse.validate();
+ return configResponse.merge(props);
+ } finally {
+ try {
+ singleUseClient.close();
+ } catch (IOException e) {
+ LOG.error("Failed to close http client used for getting catalog
configuration. Possible resource leak.", e);
Review Comment:
`http` should be all caps.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]