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 78707ebd6723d4..def265fea8288d 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.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 String getTestType() { @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 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 mergedProps = catalog.properties(); String location = mergedProps.get(CatalogProperties.WAREHOUSE_LOCATION); this.warehouseLocation = validateLocation(location);