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

yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 1dc0bb1f8af branch-4.0: [improve](iceberg rest) Use 
`catalog.listNamespaces();` to test connectivity to cover more properties. 
#58408 (#58435)
1dc0bb1f8af is described below

commit 1dc0bb1f8afcbeadee84720ce018bdf55115f5c7
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Nov 27 16:05:10 2025 +0800

    branch-4.0: [improve](iceberg rest) Use `catalog.listNamespaces();` to test 
connectivity to cover more properties. #58408 (#58435)
    
    Cherry-picked from #58408
    
    Co-authored-by: zy-kkk <[email protected]>
---
 .../datasource/connectivity/IcebergRestConnectivityTester.java | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/connectivity/IcebergRestConnectivityTester.java
 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/connectivity/IcebergRestConnectivityTester.java
index 78707ebd672..def265fea82 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/connectivity/IcebergRestConnectivityTester.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/connectivity/IcebergRestConnectivityTester.java
@@ -21,7 +21,7 @@ import 
org.apache.doris.datasource.property.metastore.AbstractIcebergProperties;
 import org.apache.doris.datasource.property.metastore.IcebergRestProperties;
 
 import org.apache.iceberg.CatalogProperties;
-import org.apache.iceberg.rest.RESTSessionCatalog;
+import org.apache.iceberg.rest.RESTCatalog;
 
 import java.util.Map;
 
@@ -43,16 +43,20 @@ public class IcebergRestConnectivityTester extends 
AbstractIcebergConnectivityTe
     @Override
     public String getErrorHint() {
         return "Please check Iceberg REST Catalog URI, authentication 
credentials (OAuth2 or SigV4), "
-                + "warehouse location, and endpoint connectivity";
+                + "warehouse (location, catalog name, or S3 Tables ARN), and 
endpoint connectivity";
     }
 
     @Override
     public void testConnection() throws Exception {
         Map<String, String> restProps = ((IcebergRestProperties) 
properties).getIcebergRestCatalogProperties();
 
-        try (RESTSessionCatalog catalog = new RESTSessionCatalog()) {
+        try (RESTCatalog catalog = new RESTCatalog()) {
             catalog.initialize("connectivity-test", restProps);
 
+            // Validate connection by listing namespaces.
+            // This verifies authentication and warehouse configuration.
+            catalog.listNamespaces();
+
             Map<String, String> mergedProps = catalog.properties();
             String location = 
mergedProps.get(CatalogProperties.WAREHOUSE_LOCATION);
             this.warehouseLocation = validateLocation(location);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to