Created on 05-15-2017 01:50 PM - edited 09-16-2022 04:36 AM
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
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
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
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
Created 06-22-2017 08:14 PM
Hi @Slim! Thank you once again, but unfortunately no, I use beeline and hiveserver2
Created 06-22-2017 08:18 PM
@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
Thank you! I've used hive1, not interactive) With interactive it works, thanks!
Created 09-27-2017 03:00 PM
@Slim - Does this mean that Druid can work only with Hive Interactive/LLAP ?
Created 06-22-2017 08:47 PM
Also you can check what version is shown when you connect via beeline at first place ?