felixYyu opened a new issue #4424:
URL: https://github.com/apache/iceberg/issues/4424
iceberg 0.13.x
spark 3.2.1
```
val spark = SparkSession
.builder()
.master("local[2]")
.appName("IcebergAPI")
.config("spark.sql.catalog.hadoop_prod",
"org.apache.iceberg.spark.SparkCatalog")
.config("spark.sql.catalog.hadoop_prod.type", "hadoop")
.config("spark.sql.catalog.hadoop_prod.warehouse",
"file:///D:/lake-iceberg/warehouse")
.config("spark.sql.extensions",
"org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
.config("spark.sql.sources.partitionOverwriteMode", "dynamic")
.config("spark.rapids.sql.enabled", true)
.getOrCreate()
val resultDF = spark.read.format("iceberg").option("snapshot-id",
6918368735882469773L)
.load("file:///D:\\lake-iceberg\\warehouse\\wmsb\\wms_do")
resultDF.show(false)
```
run error log
```
Exception in thread "main" java.lang.IllegalArgumentException: Cannot
initialize Catalog implementation org.apache.iceberg.hive.HiveCatalog: Cannot
find constructor for interface org.apache.iceberg.catalog.Catalog
Missing org.apache.iceberg.hive.HiveCatalog
[java.lang.NoClassDefFoundError:
org/apache/hadoop/hive/metastore/api/NoSuchObjectException]
at org.apache.iceberg.CatalogUtil.loadCatalog(CatalogUtil.java:182)
at
org.apache.iceberg.CatalogUtil.buildIcebergCatalog(CatalogUtil.java:234)
at
org.apache.iceberg.spark.SparkCatalog.buildIcebergCatalog(SparkCatalog.java:119)
at
org.apache.iceberg.spark.SparkCatalog.initialize(SparkCatalog.java:411)
at
org.apache.spark.sql.connector.catalog.Catalogs$.load(Catalogs.scala:60)
at
org.apache.spark.sql.connector.catalog.CatalogManager.$anonfun$catalog$1(CatalogManager.scala:52)
at scala.collection.mutable.HashMap.getOrElseUpdate(HashMap.scala:86)
at
org.apache.spark.sql.connector.catalog.CatalogManager.catalog(CatalogManager.scala:52)
at
org.apache.iceberg.spark.source.IcebergSource.catalogAndIdentifier(IcebergSource.java:129)
at
org.apache.iceberg.spark.source.IcebergSource.extractIdentifier(IcebergSource.java:159)
at
org.apache.spark.sql.DataFrameReader.$anonfun$load$1(DataFrameReader.scala:225)
at scala.Option.map(Option.scala:230)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:210)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:188)
at
com.jiuye.data.lake.api.modle.DDLPartitionSQL$.readFile(DDLPartitionSQL.scala:407)
at
com.jiuye.data.lake.api.modle.DDLPartitionSQL$.main(DDLPartitionSQL.scala:54)
at
com.jiuye.data.lake.api.modle.DDLPartitionSQL.main(DDLPartitionSQL.scala)
Caused by: java.lang.NoSuchMethodException: Cannot find constructor for
interface org.apache.iceberg.catalog.Catalog
Missing org.apache.iceberg.hive.HiveCatalog
[java.lang.NoClassDefFoundError:
org/apache/hadoop/hive/metastore/api/NoSuchObjectException]
at
org.apache.iceberg.common.DynConstructors$Builder.buildChecked(DynConstructors.java:227)
at org.apache.iceberg.CatalogUtil.loadCatalog(CatalogUtil.java:180)
... 16 more
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]