Aireed opened a new issue, #6056:
URL: https://github.com/apache/gravitino/issues/6056

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   1.  configure hive_catalog stored in gravitino in spark_default.conf
   2.  use hive_catalog which under the metalake
   3. use {database}
   4. create a hive table
   5. we got a error although we can access the table though web of gravitino.
   ```
   spark-sql> create table union_hive(id int, name string, dt string) stored as 
parquet;
   24/12/31 20:21:22 WARN ObjectStore: Failed to get database hive_db, 
returning NoSuchObjectException
   Error in query: Database 'hive_db' not found
   ```
   
![image](https://github.com/user-attachments/assets/62e5314b-ad22-49a0-a3bd-99154f84cca0)
   
   
   ### Error message and/or stacktrace
   
   spark-sql> create table union_hive(id int, name string, dt string) stored as 
parquet;
   24/12/31 20:21:22 WARN ObjectStore: Failed to get database hive_db, 
returning NoSuchObjectException
   Error in query: Database 'hive_db' not found
   
   ### How to reproduce
   
   1. create a hive_catalog in one metalake
   2. configure the metalake 
   ```
   
spark.plugins=org.apache.gravitino.spark.connector.plugin.GravitinoSparkPlugin
   spark.sql.gravitino.uri=http://amoro-dev2.gy.ntes:8090/
   spark.sql.gravitino.metalake=hive_catalog
   spark.sql.gravitino.enableIcebergSupport=true
   spark.sql.warehouse.dir=hdfs://amoro-dev3.gy.ntes:8020/user/warehouse
   spark.sql.gravitino.authType=simple
   ```
   3. use spark to access the catalog and create a hive table, we got an error 
althouth we can list the table
   
   ```
   spark-sql> use hive_catalog;
   24/12/31 20:19:38 WARN ObjectStore: Failed to get database global_temp, 
returning NoSuchObjectException
   Time taken: 0.086 seconds
   spark-sql> use hive_db;
   Time taken: 3.332 seconds
   spark-sql> create table union_hive(id int, name string, dt string) stored as 
parquet;
   24/12/31 20:21:22 WARN ObjectStore: Failed to get database hive_db, 
returning NoSuchObjectException
   Error in query: Database 'hive_db' not found
   # we can query the table 
   spark-sql> show tables;
   union_hive
   Time taken: 1.015 seconds, Fetched 4 row(s)
   ```
   4 check  whether table is created on gravitino thought web ui, found it does 
exist.
   
   
   ### Additional context
   
   _No response_


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

Reply via email to