felixYyu opened a new issue #3669:
URL: https://github.com/apache/iceberg/issues/3669


   iceberg-spark-3.2_2.12
   
   in IcebergSource's head document:
   [table = "file:/path/to/table" -> loads a HadoopTable at given path],but 
under the gived path can't load the hadoopTable. because the catalog has been 
used 'hive' DEFAULT_CATALOG_NAME.
   `if (path.contains("/")) {
         // contains a path. Return iceberg default catalog and a PathIdentifier
         return new 
Spark3Util.CatalogAndIdentifier(catalogManager.catalog(DEFAULT_CATALOG_NAME),
             new PathIdentifier(path));
       }`
   
   my test code:
   `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-icebergv2\\warehouse")
         .config("spark.sql.extensions", 
"org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
         .config("spark.sql.sources.partitionOverwriteMode", "dynamic")
         .config("spark.rapids.sql.enabled", true)//GPU
         .getOrCreate()
   
       val rootPath = spark.conf.get(s"spark.sql.catalog.hadoop_prod.warehouse")
       println(rootPath)
       val table = 
spark.read.format("iceberg").load(s"$rootPath/$schemaName/$tableName")
       table.show(truncate = false)`
   
   
   error log:
   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]


-- 
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]

Reply via email to