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

junhao 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 908337c64a [rest] Fix hadoop conf passing in RESTCatalog (#5728)
908337c64a is described below

commit 908337c64ae16be233ded76f519585e92a057b4c
Author: Jingsong Lee <[email protected]>
AuthorDate: Tue Jun 10 18:24:29 2025 +0800

    [rest] Fix hadoop conf passing in RESTCatalog (#5728)
---
 paimon-core/pom.xml                                | 54 ++++++++++------------
 .../java/org/apache/paimon/rest/RESTCatalog.java   |  6 ++-
 2 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/paimon-core/pom.xml b/paimon-core/pom.xml
index de84203bdf..51223423a0 100644
--- a/paimon-core/pom.xml
+++ b/paimon-core/pom.xml
@@ -54,6 +54,31 @@ under the License.
             
<version>${paimon.shade.jackson.version}-${paimon.shade.version}</version>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-common</artifactId>
+            <version>${hadoop.version}</version>
+            <scope>provided</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.avro</groupId>
+                    <artifactId>avro</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>jdk.tools</groupId>
+                    <artifactId>jdk.tools</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
         <!-- flink dependencies -->
 
         <dependency>
@@ -80,35 +105,6 @@ under the License.
             <scope>provided</scope>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-common</artifactId>
-            <version>${hadoop.version}</version>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.avro</groupId>
-                    <artifactId>avro</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-log4j12</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>jdk.tools</groupId>
-                    <artifactId>jdk.tools</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.google.protobuf</groupId>
-                    <artifactId>protobuf-java</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
         <dependency>
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-hdfs-client</artifactId>
diff --git a/paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java 
b/paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java
index ea81506200..e17114ab4e 100644
--- a/paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java
+++ b/paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java
@@ -97,7 +97,11 @@ public class RESTCatalog implements Catalog {
     public RESTCatalog(CatalogContext context, boolean configRequired) {
         this.api = new RESTApi(context.options(), configRequired);
         this.context =
-                CatalogContext.create(api.options(), context.preferIO(), 
context.fallbackIO());
+                CatalogContext.create(
+                        api.options(),
+                        context.hadoopConf(),
+                        context.preferIO(),
+                        context.fallbackIO());
         this.dataTokenEnabled = 
api.options().get(RESTTokenFileIO.DATA_TOKEN_ENABLED);
     }
 

Reply via email to