Skip to content

Conversation

@CalvinKirs
Copy link
Member

@CalvinKirs CalvinKirs commented Jun 23, 2025

What problem does this PR solve?

CREATE CATALOG `docker2_catalog3_iceberg` PROPERTIES (
"warehouse" = "hdfs://hadoop-master-2:8620/user/iceberg/hms/",
"uri" = "thrift://hadoop-master-2:9683",
"type" = "iceberg",
"list-all-tables" = "true",
"io-impl" = "org.apache.doris.datasource.iceberg.fileio.DelegateFileIO",
"iceberg.catalog.type" = "hms",
"hive.metastore.uris" = "thrift://hadoop-master-2:9683",
"hive.metastore.sasl.enabled" = "true",
"hive.metastore.kerberos.principal" = "hive/hadoop-master-2@OTHERREALM.COM",
"hadoop.security.authentication" = "kerberos",
"hadoop.kerberos.principal" = "hdfs/test4@OTHERREALM.COM",
"hadoop.kerberos.keytab" = "/kerberos/keytab/docker2/test4",
"fs.defaultFS" = "hdfs://hadoop-master-2:8620"
); 

show create create database icebergcatalog.db
Caused by: org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = Failed to connect to Hive Metastore
        ... 13 more
Caused by: org.apache.iceberg.hive.RuntimeMetaException: Failed to connect to Hive Metastore
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:85) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:34) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.ClientPoolImpl.get(ClientPoolImpl.java:143) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:70) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:65) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.hive.CachedClientPool.run(CachedClientPool.java:122) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveCatalog.loadNamespaceMetadata(HiveCatalog.java:643) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.doris.datasource.iceberg.IcebergExternalDatabase.getLocation(IcebergExternalDatabase.java:45) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCreateDatabaseCommand.doRun(ShowCreateDatabaseCommand.java:98) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCommand.run(ShowCommand.java:54) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:769) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
        at org.apache.hadoop.hive.metastore.utils.JavaUtils.newInstance(JavaUtils.java:86) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:95) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:148) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:119) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:112) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invokeChecked(DynMethods.java:60) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invoke(DynMethods.java:72) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$StaticMethod.invoke(DynMethods.java:189) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:63) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:34) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.ClientPoolImpl.get(ClientPoolImpl.java:143) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:70) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:65) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.hive.CachedClientPool.run(CachedClientPool.java:122) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveCatalog.loadNamespaceMetadata(HiveCatalog.java:643) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.doris.datasource.iceberg.IcebergExternalDatabase.getLocation(IcebergExternalDatabase.java:45) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCreateDatabaseCommand.doRun(ShowCreateDatabaseCommand.java:98) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCommand.run(ShowCommand.java:54) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:769) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more
Caused by: java.lang.reflect.InvocationTargetException
        at jdk.internal.reflect.GeneratedConstructorAccessor114.newInstance(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at org.apache.hadoop.hive.metastore.utils.JavaUtils.newInstance(JavaUtils.java:84) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:95) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:148) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:119) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:112) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invokeChecked(DynMethods.java:60) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invoke(DynMethods.java:72) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$StaticMethod.invoke(DynMethods.java:189) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:63) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:34) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.ClientPoolImpl.get(ClientPoolImpl.java:143) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:70) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:65) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.hive.CachedClientPool.run(CachedClientPool.java:122) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveCatalog.loadNamespaceMetadata(HiveCatalog.java:643) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.doris.datasource.iceberg.IcebergExternalDatabase.getLocation(IcebergExternalDatabase.java:45) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCreateDatabaseCommand.doRun(ShowCreateDatabaseCommand.java:98) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCommand.run(ShowCommand.java:54) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:769) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@CalvinKirs
Copy link
Member Author

run buildall

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 0.00% (0/6) 🎉
Increment coverage report
Complete coverage report

@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 24, 2025
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@morningman morningman merged commit e9937a7 into apache:master Jun 24, 2025
32 of 33 checks passed
github-actions bot pushed a commit that referenced this pull request Jun 24, 2025
…ceberg Catalog (#52149)

### What problem does this PR solve?
```
CREATE CATALOG `docker2_catalog3_iceberg` PROPERTIES (
"warehouse" = "hdfs://hadoop-master-2:8620/user/iceberg/hms/",
"uri" = "thrift://hadoop-master-2:9683",
"type" = "iceberg",
"list-all-tables" = "true",
"io-impl" = "org.apache.doris.datasource.iceberg.fileio.DelegateFileIO",
"iceberg.catalog.type" = "hms",
"hive.metastore.uris" = "thrift://hadoop-master-2:9683",
"hive.metastore.sasl.enabled" = "true",
"hive.metastore.kerberos.principal" = "hive/hadoop-master-2@OTHERREALM.COM",
"hadoop.security.authentication" = "kerberos",
"hadoop.kerberos.principal" = "hdfs/test4@OTHERREALM.COM",
"hadoop.kerberos.keytab" = "/kerberos/keytab/docker2/test4",
"fs.defaultFS" = "hdfs://hadoop-master-2:8620"
); 

show create create database icebergcatalog.db
```
```
Caused by: org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = Failed to connect to Hive Metastore
        ... 13 more
Caused by: org.apache.iceberg.hive.RuntimeMetaException: Failed to connect to Hive Metastore
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:85) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:34) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.ClientPoolImpl.get(ClientPoolImpl.java:143) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:70) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:65) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.hive.CachedClientPool.run(CachedClientPool.java:122) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveCatalog.loadNamespaceMetadata(HiveCatalog.java:643) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.doris.datasource.iceberg.IcebergExternalDatabase.getLocation(IcebergExternalDatabase.java:45) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCreateDatabaseCommand.doRun(ShowCreateDatabaseCommand.java:98) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCommand.run(ShowCommand.java:54) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:769) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
        at org.apache.hadoop.hive.metastore.utils.JavaUtils.newInstance(JavaUtils.java:86) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:95) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:148) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:119) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:112) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invokeChecked(DynMethods.java:60) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invoke(DynMethods.java:72) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$StaticMethod.invoke(DynMethods.java:189) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:63) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:34) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.ClientPoolImpl.get(ClientPoolImpl.java:143) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:70) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:65) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.hive.CachedClientPool.run(CachedClientPool.java:122) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveCatalog.loadNamespaceMetadata(HiveCatalog.java:643) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.doris.datasource.iceberg.IcebergExternalDatabase.getLocation(IcebergExternalDatabase.java:45) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCreateDatabaseCommand.doRun(ShowCreateDatabaseCommand.java:98) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCommand.run(ShowCommand.java:54) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:769) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more
Caused by: java.lang.reflect.InvocationTargetException
        at jdk.internal.reflect.GeneratedConstructorAccessor114.newInstance(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at org.apache.hadoop.hive.metastore.utils.JavaUtils.newInstance(JavaUtils.java:84) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:95) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:148) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:119) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:112) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invokeChecked(DynMethods.java:60) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invoke(DynMethods.java:72) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$StaticMethod.invoke(DynMethods.java:189) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:63) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:34) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.ClientPoolImpl.get(ClientPoolImpl.java:143) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:70) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:65) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.hive.CachedClientPool.run(CachedClientPool.java:122) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveCatalog.loadNamespaceMetadata(HiveCatalog.java:643) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.doris.datasource.iceberg.IcebergExternalDatabase.getLocation(IcebergExternalDatabase.java:45) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCreateDatabaseCommand.doRun(ShowCreateDatabaseCommand.java:98) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCommand.run(ShowCommand.java:54) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:769) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more
```
Co-authored-by: Tiewei Fang <fangtiewei@selectdb.com>
github-actions bot pushed a commit that referenced this pull request Jun 24, 2025
…ceberg Catalog (#52149)

### What problem does this PR solve?
```
CREATE CATALOG `docker2_catalog3_iceberg` PROPERTIES (
"warehouse" = "hdfs://hadoop-master-2:8620/user/iceberg/hms/",
"uri" = "thrift://hadoop-master-2:9683",
"type" = "iceberg",
"list-all-tables" = "true",
"io-impl" = "org.apache.doris.datasource.iceberg.fileio.DelegateFileIO",
"iceberg.catalog.type" = "hms",
"hive.metastore.uris" = "thrift://hadoop-master-2:9683",
"hive.metastore.sasl.enabled" = "true",
"hive.metastore.kerberos.principal" = "hive/hadoop-master-2@OTHERREALM.COM",
"hadoop.security.authentication" = "kerberos",
"hadoop.kerberos.principal" = "hdfs/test4@OTHERREALM.COM",
"hadoop.kerberos.keytab" = "/kerberos/keytab/docker2/test4",
"fs.defaultFS" = "hdfs://hadoop-master-2:8620"
); 

show create create database icebergcatalog.db
```
```
Caused by: org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = Failed to connect to Hive Metastore
        ... 13 more
Caused by: org.apache.iceberg.hive.RuntimeMetaException: Failed to connect to Hive Metastore
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:85) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:34) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.ClientPoolImpl.get(ClientPoolImpl.java:143) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:70) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:65) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.hive.CachedClientPool.run(CachedClientPool.java:122) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveCatalog.loadNamespaceMetadata(HiveCatalog.java:643) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.doris.datasource.iceberg.IcebergExternalDatabase.getLocation(IcebergExternalDatabase.java:45) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCreateDatabaseCommand.doRun(ShowCreateDatabaseCommand.java:98) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCommand.run(ShowCommand.java:54) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:769) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
        at org.apache.hadoop.hive.metastore.utils.JavaUtils.newInstance(JavaUtils.java:86) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:95) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:148) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:119) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:112) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invokeChecked(DynMethods.java:60) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invoke(DynMethods.java:72) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$StaticMethod.invoke(DynMethods.java:189) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:63) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:34) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.ClientPoolImpl.get(ClientPoolImpl.java:143) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:70) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:65) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.hive.CachedClientPool.run(CachedClientPool.java:122) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveCatalog.loadNamespaceMetadata(HiveCatalog.java:643) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.doris.datasource.iceberg.IcebergExternalDatabase.getLocation(IcebergExternalDatabase.java:45) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCreateDatabaseCommand.doRun(ShowCreateDatabaseCommand.java:98) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCommand.run(ShowCommand.java:54) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:769) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more
Caused by: java.lang.reflect.InvocationTargetException
        at jdk.internal.reflect.GeneratedConstructorAccessor114.newInstance(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at org.apache.hadoop.hive.metastore.utils.JavaUtils.newInstance(JavaUtils.java:84) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:95) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:148) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:119) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:112) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invokeChecked(DynMethods.java:60) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invoke(DynMethods.java:72) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$StaticMethod.invoke(DynMethods.java:189) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:63) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:34) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.ClientPoolImpl.get(ClientPoolImpl.java:143) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:70) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:65) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.hive.CachedClientPool.run(CachedClientPool.java:122) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveCatalog.loadNamespaceMetadata(HiveCatalog.java:643) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.doris.datasource.iceberg.IcebergExternalDatabase.getLocation(IcebergExternalDatabase.java:45) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCreateDatabaseCommand.doRun(ShowCreateDatabaseCommand.java:98) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCommand.run(ShowCommand.java:54) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:769) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more
```
Co-authored-by: Tiewei Fang <fangtiewei@selectdb.com>
github-actions bot pushed a commit that referenced this pull request Jun 24, 2025
…ceberg Catalog (#52149)

### What problem does this PR solve?
```
CREATE CATALOG `docker2_catalog3_iceberg` PROPERTIES (
"warehouse" = "hdfs://hadoop-master-2:8620/user/iceberg/hms/",
"uri" = "thrift://hadoop-master-2:9683",
"type" = "iceberg",
"list-all-tables" = "true",
"io-impl" = "org.apache.doris.datasource.iceberg.fileio.DelegateFileIO",
"iceberg.catalog.type" = "hms",
"hive.metastore.uris" = "thrift://hadoop-master-2:9683",
"hive.metastore.sasl.enabled" = "true",
"hive.metastore.kerberos.principal" = "hive/hadoop-master-2@OTHERREALM.COM",
"hadoop.security.authentication" = "kerberos",
"hadoop.kerberos.principal" = "hdfs/test4@OTHERREALM.COM",
"hadoop.kerberos.keytab" = "/kerberos/keytab/docker2/test4",
"fs.defaultFS" = "hdfs://hadoop-master-2:8620"
); 

show create create database icebergcatalog.db
```
```
Caused by: org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = Failed to connect to Hive Metastore
        ... 13 more
Caused by: org.apache.iceberg.hive.RuntimeMetaException: Failed to connect to Hive Metastore
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:85) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:34) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.ClientPoolImpl.get(ClientPoolImpl.java:143) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:70) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:65) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.hive.CachedClientPool.run(CachedClientPool.java:122) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveCatalog.loadNamespaceMetadata(HiveCatalog.java:643) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.doris.datasource.iceberg.IcebergExternalDatabase.getLocation(IcebergExternalDatabase.java:45) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCreateDatabaseCommand.doRun(ShowCreateDatabaseCommand.java:98) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCommand.run(ShowCommand.java:54) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:769) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
        at org.apache.hadoop.hive.metastore.utils.JavaUtils.newInstance(JavaUtils.java:86) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:95) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:148) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:119) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:112) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invokeChecked(DynMethods.java:60) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invoke(DynMethods.java:72) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$StaticMethod.invoke(DynMethods.java:189) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:63) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:34) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.ClientPoolImpl.get(ClientPoolImpl.java:143) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:70) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:65) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.hive.CachedClientPool.run(CachedClientPool.java:122) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveCatalog.loadNamespaceMetadata(HiveCatalog.java:643) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.doris.datasource.iceberg.IcebergExternalDatabase.getLocation(IcebergExternalDatabase.java:45) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCreateDatabaseCommand.doRun(ShowCreateDatabaseCommand.java:98) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCommand.run(ShowCommand.java:54) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:769) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more
Caused by: java.lang.reflect.InvocationTargetException
        at jdk.internal.reflect.GeneratedConstructorAccessor114.newInstance(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at org.apache.hadoop.hive.metastore.utils.JavaUtils.newInstance(JavaUtils.java:84) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:95) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:148) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:119) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:112) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invokeChecked(DynMethods.java:60) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$UnboundMethod.invoke(DynMethods.java:72) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.common.DynMethods$StaticMethod.invoke(DynMethods.java:189) ~[iceberg-common-1.9.1.jar:?]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:63) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveClientPool.newClient(HiveClientPool.java:34) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.ClientPoolImpl.get(ClientPoolImpl.java:143) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:70) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:65) ~[iceberg-core-1.9.1.jar:?]
        at org.apache.iceberg.hive.CachedClientPool.run(CachedClientPool.java:122) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.iceberg.hive.HiveCatalog.loadNamespaceMetadata(HiveCatalog.java:643) ~[hive-catalog-shade-3.0.1.jar:3.0.1]
        at org.apache.doris.datasource.iceberg.IcebergExternalDatabase.getLocation(IcebergExternalDatabase.java:45) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCreateDatabaseCommand.doRun(ShowCreateDatabaseCommand.java:98) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ShowCommand.run(ShowCommand.java:54) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:769) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more
```
Co-authored-by: Tiewei Fang <fangtiewei@selectdb.com>
morrySnow pushed a commit that referenced this pull request Jun 24, 2025
… accessing Iceberg Catalog #52149 (#52235)

Cherry-picked from #52149

Co-authored-by: Calvin Kirs <guoqiang@selectdb.com>
Co-authored-by: Tiewei Fang <fangtiewei@selectdb.com>
yiguolei pushed a commit that referenced this pull request Jun 28, 2025
… accessing Iceberg Catalog #52149 (#52234)

Cherry-picked from #52149

Co-authored-by: Calvin Kirs <guoqiang@selectdb.com>
Co-authored-by: Tiewei Fang <fangtiewei@selectdb.com>
dataroaring pushed a commit that referenced this pull request Jul 9, 2025
… accessing Iceberg Catalog #52149 (#52233)

Cherry-picked from #52149

Co-authored-by: Calvin Kirs <guoqiang@selectdb.com>
Co-authored-by: Tiewei Fang <fangtiewei@selectdb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants