nastra commented on code in PR #14161:
URL: https://github.com/apache/iceberg/pull/14161#discussion_r2523679458


##########
aws/src/main/java/org/apache/iceberg/aws/WrappedSdkHttpClient.java:
##########
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iceberg.aws;
+
+import 
org.apache.iceberg.relocated.com.google.common.annotations.VisibleForTesting;
+import software.amazon.awssdk.http.ExecutableHttpRequest;
+import software.amazon.awssdk.http.HttpExecuteRequest;
+import software.amazon.awssdk.http.SdkHttpClient;
+
+/**
+ * A delegating wrapper around SdkHttpClient that handles reference counting 
for lifecycle
+ * management. When close() is called, it decrements the reference count and 
only closes the
+ * underlying client when the count reaches zero.
+ */
+class WrappedSdkHttpClient implements SdkHttpClient {

Review Comment:
   couldn't we essentially just have `ManagedHttpClient` implement this 
interface and handle everything else in `ManagedHttpClient`? I feel like we're 
unnecessary adding another layer of wrapping just for making sure that 
`close()` releases the client but that could also be handled in 
`ManagedHttpClient`



##########
aws/src/main/java/org/apache/iceberg/aws/ApacheHttpClientConfigurations.java:
##########
@@ -115,6 +129,31 @@ void 
configureApacheHttpClientBuilder(ApacheHttpClient.Builder apacheHttpClientB
     }
   }
 
+  /**
+   * Generate a cache key based on HTTP client configuration. This ensures 
clients with identical
+   * configurations share the same HTTP client instance.
+   */
+  private String generateHttpClientCacheKey() {
+

Review Comment:
   nit: unnecessary newline



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

Reply via email to