flyrain commented on code in PR #12406:
URL: https://github.com/apache/iceberg/pull/12406#discussion_r1992052511

##########
core/src/main/java/org/apache/iceberg/rest/RESTCatalog.java:
##########
@@ -55,7 +59,50 @@ public class RESTCatalog
   public RESTCatalog() {
     this(
         SessionCatalog.SessionContext.createEmpty(),
-        config -> 
HTTPClient.builder(config).uri(config.get(CatalogProperties.URI)).build());
+        config -> {
+          HTTPClient.Builder builder =
+              
HTTPClient.builder(config).uri(config.get(CatalogProperties.URI));
+
+          String proxyHostname =
+              PropertyUtil.propertyAsString(
+                  config,
+                  CatalogProperties.PROXY_HOSTNAME,
+                  CatalogProperties.PROXY_HOSTNAME_DEFAULT);
+
+          int proxyPort =
+              PropertyUtil.propertyAsInt(
+                  config, CatalogProperties.PROXY_PORT, 
CatalogProperties.PROXY_PORT_DEFAULT);

Review Comment:
   Minor: move it into the if clause(line 77)? 



##########
core/src/main/java/org/apache/iceberg/CatalogProperties.java:
##########
@@ -32,6 +32,17 @@ private CatalogProperties() {}
   public static final String VIEW_DEFAULT_PREFIX = "view-default.";
   public static final String METRICS_REPORTER_IMPL = "metrics-reporter-impl";
 
+  /** http proxy configuration for rest catalog */
+  public static final String PROXY_HOSTNAME = "proxy.hostname";
+

Review Comment:
   Nit: remove the empty line?



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to