This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new e481f779e8 [hotfix] Remove FileIOUtils to avid ambiguity of the same 
name
e481f779e8 is described below

commit e481f779e8525e252a77c216235b4d78c50a1002
Author: JingsongLi <[email protected]>
AuthorDate: Tue Aug 19 13:08:55 2025 +0800

    [hotfix] Remove FileIOUtils to avid ambiguity of the same name
---
 .../src/main/java/org/apache/paimon/fs/FileIO.java | 14 ++++++-
 .../java/org/apache/paimon/fs/FileIOUtils.java     | 47 ----------------------
 .../org/apache/paimon/fs/VectoredReadUtils.java    |  7 +++-
 3 files changed, 19 insertions(+), 49 deletions(-)

diff --git a/paimon-common/src/main/java/org/apache/paimon/fs/FileIO.java 
b/paimon-common/src/main/java/org/apache/paimon/fs/FileIO.java
index 8150c35e3d..b7037693ee 100644
--- a/paimon-common/src/main/java/org/apache/paimon/fs/FileIO.java
+++ b/paimon-common/src/main/java/org/apache/paimon/fs/FileIO.java
@@ -53,7 +53,6 @@ import java.util.ServiceLoader;
 import java.util.Set;
 import java.util.stream.Collectors;
 
-import static org.apache.paimon.fs.FileIOUtils.checkAccess;
 import static 
org.apache.paimon.options.CatalogOptions.RESOLVING_FILE_IO_ENABLED;
 import static org.apache.paimon.utils.Preconditions.checkArgument;
 
@@ -606,4 +605,17 @@ public interface FileIO extends Serializable, Closeable {
                 });
         return results;
     }
+
+    static FileIOLoader checkAccess(FileIOLoader fileIO, Path path, 
CatalogContext config)
+            throws IOException {
+        if (fileIO == null) {
+            return null;
+        }
+
+        // check access
+        FileIO io = fileIO.load(path);
+        io.configure(config);
+        io.exists(path);
+        return fileIO;
+    }
 }
diff --git a/paimon-common/src/main/java/org/apache/paimon/fs/FileIOUtils.java 
b/paimon-common/src/main/java/org/apache/paimon/fs/FileIOUtils.java
deleted file mode 100644
index 556453424e..0000000000
--- a/paimon-common/src/main/java/org/apache/paimon/fs/FileIOUtils.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.fs;
-
-import org.apache.paimon.catalog.CatalogContext;
-
-import java.io.IOException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import static org.apache.paimon.utils.ThreadUtils.newDaemonThreadFactory;
-
-/** Utils for {@link FileIO}. */
-public class FileIOUtils {
-
-    public static final ExecutorService IO_THREAD_POOL =
-            
Executors.newCachedThreadPool(newDaemonThreadFactory("IO-THREAD-POOL"));
-
-    public static FileIOLoader checkAccess(FileIOLoader fileIO, Path path, 
CatalogContext config)
-            throws IOException {
-        if (fileIO == null) {
-            return null;
-        }
-
-        // check access
-        FileIO io = fileIO.load(path);
-        io.configure(config);
-        io.exists(path);
-        return fileIO;
-    }
-}
diff --git 
a/paimon-common/src/main/java/org/apache/paimon/fs/VectoredReadUtils.java 
b/paimon-common/src/main/java/org/apache/paimon/fs/VectoredReadUtils.java
index e55ac882b6..bda768ef96 100644
--- a/paimon-common/src/main/java/org/apache/paimon/fs/VectoredReadUtils.java
+++ b/paimon-common/src/main/java/org/apache/paimon/fs/VectoredReadUtils.java
@@ -27,12 +27,14 @@ import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.List;
 import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 import java.util.stream.Collectors;
 
 import static java.util.Objects.requireNonNull;
-import static org.apache.paimon.fs.FileIOUtils.IO_THREAD_POOL;
 import static org.apache.paimon.fs.FileRange.createFileRange;
 import static org.apache.paimon.utils.Preconditions.checkArgument;
+import static org.apache.paimon.utils.ThreadUtils.newDaemonThreadFactory;
 
 /* This file is based on source code from the Hadoop Project 
(http://hadoop.apache.org/), licensed by the Apache
  * Software Foundation (ASF) under the Apache License, Version 2.0. See the 
NOTICE file distributed with this work for
@@ -41,6 +43,9 @@ import static 
org.apache.paimon.utils.Preconditions.checkArgument;
 /** Utils for {@link VectoredReadable}. */
 public class VectoredReadUtils {
 
+    public static final ExecutorService IO_THREAD_POOL =
+            
Executors.newCachedThreadPool(newDaemonThreadFactory("VECTORED-IO-THREAD"));
+
     public static void readVectored(VectoredReadable readable, List<? extends 
FileRange> ranges)
             throws IOException {
         if (ranges.isEmpty()) {

Reply via email to