PyRSA commented on code in PR #11037:
URL: https://github.com/apache/paimon/pull/11037#discussion_r4510597686


##########
paimon-filesystems/paimon-s3-impl/src/main/java/org/apache/paimon/s3/RecoverableS3AFileSystem.java:
##########
@@ -0,0 +1,123 @@
+/*
+ * 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.paimon.s3;
+
+import org.apache.hadoop.fs.s3a.S3AFileSystem;
+import org.apache.hadoop.fs.s3a.S3ClientFactory;
+import org.apache.hadoop.fs.s3a.impl.ClientManager;
+import org.apache.hadoop.fs.statistics.DurationTrackerFactory;
+import software.amazon.awssdk.core.interceptor.Context;
+import software.amazon.awssdk.core.interceptor.ExecutionAttributes;
+import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.IdentityHashMap;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+/**
+ * {@link S3AFileSystem} that evicts itself from {@link S3FileIO}'s cache when 
the sync Apache HTTP
+ * connection pool has been shut down.
+ *
+ * <p>Only handles {@code IllegalStateException("Connection pool shut down")} 
from the Apache HTTP
+ * client. Netty async failures are out of scope. Previously published 
instances are not closed, and
+ * failed requests are not retried automatically; callers must retry and 
obtain a recovered
+ * filesystem through {@link S3FileIO}.
+ */
+class RecoverableS3AFileSystem extends S3AFileSystem {

Review Comment:
   Thanks for pointing this out. I've updated `S3ASchemeTest` to verify the S3A 
superclass hierarchy by class name instead of asserting the exact runtime class 
name. This avoids relying on `instanceof`, which may be unreliable across 
isolated classloaders.



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