zaq1xsw2cde3vf opened a new issue #3147:
URL: https://github.com/apache/iceberg/issues/3147


   where use beeline read iceberg table on HDFS,  cast error
   
   `java.lang.NoClassDefFoundError: 
org/apache/iceberg/shaded/com/github/benmanes/caffeine/cache/RemovalCause$1 
(state=,code=0)`
   
   ENV:
   - HDP hive 3.1
   - spark 3.1.2
   - iceberg-hive-runtime-0.12.0
   
   OP:
   1.  spark generate a iceberg table and insert data on HDFS. catalog = 
hadoop. OK
   2.  read table by spark code. OK
   3. create external table on hive. OK. It can auto load schema from iceberg 
table when check by describe extended tablename.
   `
   hive> add jar iceberg-hive-runtime.jar;
   hive> SET iceberg.catalog.hadoop_prod.type=hadoop;
   hive> SET iceberg.catalog.hadoop_prod.warehouse=hdfs://path/to/dir;
   hive> CREATE EXTERNAL TABLE iceberg.table1 STORED BY 
'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler' TBLPROPERTIES 
('iceberg.catalog'='hadoop_prod');
   `
   4. run. error -> 
   `
   0: jdbc:hive2://cs-nn-02.rdsp.com:2181,cs-nn-> select * from table1;
   INFO  : Compiling 
command(queryId=hive_20210918153256_50630344-2cb5-4e8a-8d79-77534a837288): 
select * from table1
   INFO  : Semantic Analysis Completed (retrial = false)
   INFO  : Returning Hive schema: 
Schema(fieldSchemas:[FieldSchema(name:table1.c1, type:int, comment:null), 
FieldSchema(name:table1.c2, type:string, comment:null), 
FieldSchema(name:table1.c3, type:string, comment:null)], properties:null)
   INFO  : Completed compiling 
command(queryId=hive_20210918153256_50630344-2cb5-4e8a-8d79-77534a837288); Time 
taken: 3.899 seconds
   INFO  : Executing 
command(queryId=hive_20210918153256_50630344-2cb5-4e8a-8d79-77534a837288): 
select * from table1
   INFO  : Completed executing 
command(queryId=hive_20210918153256_50630344-2cb5-4e8a-8d79-77534a837288); Time 
taken: 0.014 seconds
   INFO  : OK
   Error: java.lang.NoClassDefFoundError: 
org/apache/iceberg/shaded/com/github/benmanes/caffeine/cache/RemovalCause$1 
(state=,code=0)
   `
   Thanks very much!


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