- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Hive druid handler "java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/DefaultHiveMetaHook"
- Labels:
-
Apache Hive
Created on ‎05-15-2017 01:50 PM - edited ‎09-16-2022 04:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I've installed HDP 2.6 and installed druid. Trying to create external table to a wikiticker datasource gives me an error:
Error: java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/DefaultHiveMetaHook (state=,code=0)
I've added druid handler (lib/hive-druid-handler.jar) with "add jar" before. Tried to add hive metastore jar - it did not help. How to use this handler? Thank you!
Created ‎06-21-2017 03:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you add the command used to create the external table please ? BTW you shouldn't have to add the druid storage handler jars it is done automatically.
Created ‎06-21-2017 08:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Slim!
Thank you for your reply 😉 First I try:
CREATE EXTERNAL TABLE druid_table_1 STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler' TBLPROPERTIES ("druid.datasource" = "wikiticker");
But no jar:
23:01:08 [CREATE - 0 rows, 0.023 secs] [Code: 40000, SQL State: 42000] Error while compiling statement: FAILED: SemanticException Cannot find class 'org.apache.hadoop.hive.druid.DruidStorageHandler'
Than I try to add driver:
add jar hdfs://hdfscian/user/ptarasov/jars/hive-druid-handler.jar;
Ok:
INFO : converting to local hdfs://hdfscian/user/ptarasov/jars/hive-druid-handler.jar INFO : Added [/tmp/e4328d39-3c33-47fd-bd08-c7b0a72dcf73_resources/hive-druid-handler.jar] to class path INFO : Added resources: [hdfs://hdfscian/user/ptarasov/jars/hive-druid-handler.jar]
And once again create external table, but no luck:
Error: java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/DefaultHiveMetaHook (state=,code=0)
Created ‎06-21-2017 08:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like you are using Old hive CLI driver called Hive1, you need to use Hive2 interactive via Beeline command line on the box it self or via JDBC.
https://community.hortonworks.com/articles/4103/hiveserver2-jdbc-connection-url-examples.html
Created on ‎06-21-2017 08:35 PM - edited ‎08-17-2019 05:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎06-22-2017 08:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Slim! Thank you once again, but unfortunately no, I use beeline and hiveserver2
Created ‎06-22-2017 08:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Pavel Tarasov are you sure you are using the interactive JDBC link as pointed by the picture above ? Can you run LLAP queries ?
Created ‎09-13-2017 06:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! I've used hive1, not interactive) With interactive it works, thanks!
Created ‎09-27-2017 03:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Slim - Does this mean that Druid can work only with Hive Interactive/LLAP ?
Created ‎06-22-2017 08:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also you can check what version is shown when you connect via beeline at first place ?
