Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Creating hive table to read data from kafka topics giving error "Error: Error running query: java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/DefaultHiveMetaHook (state=,code=0)"

Highlighted

Creating hive table to read data from kafka topics giving error "Error: Error running query: java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/DefaultHiveMetaHook (state=,code=0)"

Explorer

I am trying to create a hive table to read data from kafka topics :

create table statement:

 

CREATE EXTERNAL TABLE kafka_table
  (`timestamp` timestamp , `page` string,  `newPage` boolean,
  added int, deleted bigint, delta double)
  STORED BY 'org.apache.hadoop.hive.kafka.KafkaStorageHandler'
  TBLPROPERTIES
  ("kafka.topic" = "kafka-topic-name", "kafka.bootstrap.servers"="hostname:9092");

 

add jar /home//kafka-handler-3.1.0.3.1.0.0-78.jar;
add jar /home//hive-serde-0.10.0.jar;
add jar /home//hive-metastore-0.9.0.jar;

 

giving me below error:

 

Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.metastore.DefaultHiveMetaHook
org/apache/hadoop/hive/metastore/DefaultHiveMetaHook

Error: Error running query: java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/DefaultHiveMetaHook (state=,code=0)

 

I am not able to find out this jar online anywhere.

I am using CDH 6.2.0 and respective parcels for hive and spark.

1 REPLY 1

Re: Creating hive table to read data from kafka topics giving error "Error: Error running query: java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/DefaultHiveMetaHook (state=,code=0)"

Explorer

have you found a solution? I'm facing the same issue.

 

I tried using /hive-standalone-metastore-3.1.2000.7.0.3.0-79.jar

and hive-metastore-2.1.1-cdh6.2.0.jar, but all of them seemed not working.

Don't have an account?
Coming from Hortonworks? Activate your account here