Skip to main content
rsurti
Gold ⭐️
November 8, 2024
Solved

Issue with Hive HQL insert query - KryoException - Encounter encorrect class id

Hi

      I have hadoop cluster with version 3.4.0,  hive version 3.1.3 and tez 0.9.2

When i try to insert data i am facing issue:

insert into client_orc_update (client_name) values("hello");

Caused by: org.apache.hive.com.esotericsoftware.kryo.KryoException: Encountered unregistered class ID: 95
Serialization trace:
conf (org.apache.hadoop.hive.ql.exec.TableScanOperator)
aliasToWork (org.apache.hadoop.hive.ql.plan.MapWork)

 

another error i am getting on insert command with overwrite when transfering data from one table to another.

 

Caused by: java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.apache.hadoop.fs.FileStatus.compareTo(Lorg/apache/hadoop/fs/FileStatus;)I
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.generateSplitsInfo(OrcInputFormat.java:1790)
... 17 more
Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.fs.FileStatus.compareTo(Lorg/apache/hadoop/fs/FileStatus;)I




 When run the above queries on MR it works.

but if change the execution engine to tez, it throws error;

 

Can anyone help here? Thanks

ggangadharan
Gold ⭐️
November 11, 2024

Generally, a NoSuchMethodError occurs when there is a mismatch in the classpath. To resolve this issue, please verify the classpaths of both HS2 and Hadoop,  to ensure that there are no incorrect versions of Hadoop libraries present.

If you are not able to identify any mismatched jar, please add the -verbose
JVM argument to both HS2 and hive.tez.java.opts. This will help validate the classes loaded as part of the query and provide additional information.


3 replies

DianaTorres
Community Manager
Community Manager
November 8, 2024

@rsurti Welcome to the Cloudera Community!

To help you get the best possible solution, I have tagged our Hadoop experts @sandeepV2 @Asok  who may be able to assist you further.

Please keep us updated on your post, and we hope you find a satisfactory solution to your query.

Translate
Regards, Diana Torres, Senior Community Moderator
ggangadharan
Gold ⭐️
Gold ⭐️
November 11, 2024

Generally, a NoSuchMethodError occurs when there is a mismatch in the classpath. To resolve this issue, please verify the classpaths of both HS2 and Hadoop,  to ensure that there are no incorrect versions of Hadoop libraries present.

If you are not able to identify any mismatched jar, please add the -verbose
JVM argument to both HS2 and hive.tez.java.opts. This will help validate the classes loaded as part of the query and provide additional information.


Translate
rsurti
rsurtiAuthor
Gold ⭐️
November 11, 2024

 Thanks yes it was version mismatch issue upgrading hive - 4.0 and tez 0.10.3 works forme

Translate