This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new b417ef3be3b [BugFix](Iceberg Catalog) Fix iceberg catalog of hms and
hadoop not support iceberg properties (#33113)
b417ef3be3b is described below
commit b417ef3be3b731efca824e2a72851735d71518c7
Author: GoGoWen <[email protected]>
AuthorDate: Fri Apr 5 08:02:45 2024 +0800
[BugFix](Iceberg Catalog) Fix iceberg catalog of hms and hadoop not
support iceberg properties (#33113)
* fix iceberg catalog of hms and hadoop not support iceberg properties
* remove unused import
---
.../apache/doris/datasource/iceberg/IcebergHMSExternalCatalog.java | 3 +--
.../doris/datasource/iceberg/IcebergHadoopExternalCatalog.java | 5 ++---
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergHMSExternalCatalog.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergHMSExternalCatalog.java
index 221aed4cd8c..34e6f0c187e 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergHMSExternalCatalog.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergHMSExternalCatalog.java
@@ -24,7 +24,6 @@ import
org.apache.doris.datasource.property.constants.HMSProperties;
import org.apache.iceberg.CatalogProperties;
import org.apache.iceberg.hive.HiveCatalog;
-import java.util.HashMap;
import java.util.Map;
public class IcebergHMSExternalCatalog extends IcebergExternalCatalog {
@@ -42,7 +41,7 @@ public class IcebergHMSExternalCatalog extends
IcebergExternalCatalog {
HiveCatalog hiveCatalog = new org.apache.iceberg.hive.HiveCatalog();
hiveCatalog.setConf(getConfiguration());
// initialize hive catalog
- Map<String, String> catalogProperties = new HashMap<>();
+ Map<String, String> catalogProperties =
catalogProperty.getProperties();
String metastoreUris =
catalogProperty.getOrDefault(HMSProperties.HIVE_METASTORE_URIS, "");
catalogProperties.put(CatalogProperties.URI, metastoreUris);
hiveCatalog.initialize(icebergCatalogType, catalogProperties);
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergHadoopExternalCatalog.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergHadoopExternalCatalog.java
index e86bdd61369..01eee31d3b0 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergHadoopExternalCatalog.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergHadoopExternalCatalog.java
@@ -27,7 +27,6 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.iceberg.CatalogProperties;
import org.apache.iceberg.hadoop.HadoopCatalog;
-import java.util.HashMap;
import java.util.Map;
public class IcebergHadoopExternalCatalog extends IcebergExternalCatalog {
@@ -56,8 +55,8 @@ public class IcebergHadoopExternalCatalog extends
IcebergExternalCatalog {
HadoopCatalog hadoopCatalog = new HadoopCatalog();
Configuration conf = getConfiguration();
initS3Param(conf);
- // initialize hive catalog
- Map<String, String> catalogProperties = new HashMap<>();
+ // initialize hadoop catalog
+ Map<String, String> catalogProperties =
catalogProperty.getProperties();
String warehouse =
catalogProperty.getHadoopProperties().get(CatalogProperties.WAREHOUSE_LOCATION);
hadoopCatalog.setConf(conf);
catalogProperties.put(CatalogProperties.WAREHOUSE_LOCATION, warehouse);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]