apache / iceberg

Apache Iceberg
https://iceberg.apache.org/
Apache License 2.0
6.13k stars 2.13k forks source link

beeline query iceberg table error #3146

Closed Neo966 closed 2 weeks ago

Neo966 commented 2 years ago

0: jdbc:hive2://xxx:218> select from iceberg_test; INFO : Compiling command(queryId=hive_20210918134550_136a108f-6791-4c3a-ac0b-25cde234c7a7): select from iceberg_test INFO : Semantic Analysis Completed INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:iceberg_test.id, type:bigint, comment:null), FieldSchema(name:iceberg_test.name, type:string, comment:null)], properties:null) INFO : Completed compiling command(queryId=hive_20210918134550_136a108f-6791-4c3a-ac0b-25cde234c7a7); Time taken: 1.196 seconds INFO : Concurrency mode is disabled, not creating a lock manager INFO : Executing command(queryId=hive_20210918134550_136a108f-6791-4c3a-ac0b-25cde234c7a7): select * from iceberg_test INFO : Completed executing command(queryId=hive_20210918134550_136a108f-6791-4c3a-ac0b-25cde234c7a7); Time taken: 0.027 seconds INFO : OK Error: java.io.IOException: java.lang.ClassCastException: org.apache.iceberg.mr.mapred.Container cannot be cast to org.apache.iceberg.mr.mapred.Container (state=,code=0)

0: jdbc:hive2://xxx:218> set iceberg.mr.reuse.containers=true; Error: Error while processing statement: Cannot modify iceberg.mr.reuse.containers at runtime. It is not in list of params that are allowed to be modified at runtime (state=42000,code=1)

Neo966 commented 2 years ago

sometimes report this error:

0: jdbc:hive2://xxx:218> select from iceberg_test; INFO : Compiling command(queryId=hive_20210918134550_136a108f-6791-4c3a-ac0b-25cde234c7a7): select from iceberg_test INFO : Semantic Analysis Completed INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:iceberg_test.id, type:bigint, comment:null), FieldSchema(name:iceberg_test.name, type:string, comment:null)], properties:null) INFO : Completed compiling command(queryId=hive_20210918134550_136a108f-6791-4c3a-ac0b-25cde234c7a7); Time taken: 1.196 seconds INFO : Concurrency mode is disabled, not creating a lock manager INFO : Executing command(queryId=hive_20210918134550_136a108f-6791-4c3a-ac0b-25cde234c7a7): select * from iceberg_test INFO : Completed executing command(queryId=hive_20210918134550_136a108f-6791-4c3a-ac0b-25cde234c7a7); Time taken: 0.027 seconds INFO : OK Error: java.io.IOException: java.lang.ClassCastException: org.apache.iceberg.mr.mapred.Container cannot be cast to org.apache.iceberg.mr.mapred.Container (state=,code=0) 0: jdbc:hive2://xxx:218> set iceberg.mr.reuse.containers=true; Error: Error while processing statement: Cannot modify iceberg.mr.reuse.containers at runtime. It is not in list of params that are allowed to be modified at runtime (state=42000,code=1)

hive version:2.1.1 create table ddl: CREATE TABLE iceberg_test(id bigint, name string) STORED BY 'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler';

lizc9 commented 2 years ago

Have you found a solution? I have the same problem

pvary commented 2 years ago

Could you please try this with Hive 2.3.8? We do all of the testing with that version.

Thanks, Peter

pvary commented 2 years ago

Or alternatively 3.1.2

Neo966 commented 2 years ago

it's works, place the iceberg-hive-runtime-0.12.0 jar under the hive auxlib directory.

pvary commented 2 years ago

Maybe order of the jars in the classpath is different. Is there another iceberg jar on the classpath?

Neo966 commented 2 years ago

no, only one jar.

It works, but does not support field filtering. throw exception: java.lang.NoSuchMethodError: org.apache.hadoop.hive.ql.io.sarg.ConvertAstToSearchArg.create(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/hive/ql/plan/ExprNodeGenericFuncDesc;)Lorg/apache/hadoop/hive/ql/io/sarg/SearchArgument;

the official website say support 2.x and 3.1.2 hive version, only 2.3.8 and 3.1.2 version was fully tested?

pvary commented 2 years ago

the official website say support 2.x and 3.1.2 hive version, only 2.3.8 and 3.1.2 version was fully tested?

Those are the versions that the unit tests are run. Maybe we should clarify in the doc. Good point!

wangmiao1002 commented 2 years ago

I also encountered the same problem. I tried to solve it in this way. At present, the test is successful. I don't know whether it is reasonable or not.

Put iceberg-hive-runtime-0.13.1 jar in hive AUX JARS_ Path configuration directory; Recompile the hive runtime module and modify the dependencies in the project to version 2.1.1

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.

github-actions[bot] commented 2 weeks ago

This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'