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.

issue hive druid datasource creation "FAILED: SemanticException Cannot find class 'org.apache.hadoop.hive.druid.DruidStorageHandler"

issue hive druid datasource creation "FAILED: SemanticException Cannot find class 'org.apache.hadoop.hive.druid.DruidStorageHandler"

New Contributor

Hie everybody, I am facing a issue on hdp-2.6 .

I want to create druid datasource using hive.

CREATE TABLE d_test

STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler'

AS select ...

I am using Hive2 interactive as advice here but when i run my query i get "FAILED: SemanticException Cannot find class 'org.apache.hadoop.hive.druid.DruidStorageHandler".

But when i insist the query seem runing and take too long time and not finished to execute.

Please could you help because i don't know where the issue come from and without my druid datasource i can do nothing.

Thank you all in advance !!!

5 REPLIES 5

Re: issue hive druid datasource creation "FAILED: SemanticException Cannot find class 'org.apache.hadoop.hive.druid.DruidStorageHandler"

Rising Star

Could you add a complete query that reproduces the issue? (specifically including the TBLPROPERTIES)

Re: issue hive druid datasource creation "FAILED: SemanticException Cannot find class 'org.apache.hadoop.hive.druid.DruidStorageHandler"

New Contributor

Hie @Dennis Jaheruddin, thank you you for you reply,

Here is the example for my query:

CREATE TABLE measures

STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler'

AS select

id,

field1,

region,

cast(from_unixtime(unix_timestamp(annee, 'yyyy')) as timestamp) as `__time`,

price,

quantite

from order;

I am also facing a issue with hive:

- query are too long and don't finished

86474-capture-decran-2018-08-14-a-154210.png

- Sometimes i get this error: There are no available threads to handle view requests et i see no views in ambari to access for example to file views or hive view 2.0

86476-no-view.png

Thank you in advance !

Re: issue hive druid datasource creation "FAILED: SemanticException Cannot find class 'org.apache.hadoop.hive.druid.DruidStorageHandler"

Rising Star

@alassane SOW

I think these are several topics, so I would recommend you not to put everything in 1 question to avoid confusion.

That being said: The orange arrow indicates that hive needs a restart, so I would do that first before investigating the views further.

About the main topic:

The first step that I would recommend is trying whether you can create any druid table at all, by following exactly what is mentioned in the documentation.

Depending on your version one of these should do the trick (check documentation for proper formatting as the copy paste is giving me some trouble):

For 3.0:

CREATE EXTERNAL TABLE druid_table_1
(`__time` TIMESTAMP, `dimension1` STRING, `dimension2` STRING, `metric1` INT, `metric2` FLOAT)
STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler';

For 2.2:

CREATE TABLE druid_table_1
(`__time` TIMESTAMP, `dimension1` STRING, `dimension2` STRING, `metric1` INT, `metric2` FLOAT)
STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler';

Re: issue hive druid datasource creation "FAILED: SemanticException Cannot find class 'org.apache.hadoop.hive.druid.DruidStorageHandler"

New Contributor

Thanks @Dennis Jaheruddin ,

I was able to create druid tables two months ago.

But now i cannot create them anymore, i have tried the examples you gave me from the documentation but that doesn't work.

I have always this error: Error: Error while compiling statement: FAILED: SemanticException Cannot find class 'org.apache.hadoop.hive.druid.DruidStorageHandler' (state=42000,code=40000).

86525-capture-decran-2018-08-16-a-101142.png

Maybe i have version problem, in my ambari i see that hive version is 1.2.1000.

If so, what i have to do ?

86526-capture-decran-2018-08-16-a-101503.png

In the documentation the hive version mentionned is 2.2 or 3.0.

Thanks in advance !

Re: issue hive druid datasource creation "FAILED: SemanticException Cannot find class 'org.apache.hadoop.hive.druid.DruidStorageHandler"

New Contributor

Hie world,

@Slim , i have posted an issue regarding the error message:

Error: Error while compiling statement: FAILED: SemanticException Cannot find class 'org.apache.hadoop.hive.druid.DruidStorageHandler' (state=42000,code=40000) in HDP 6 days ago.

But i have not yet a reply, can you please help !

I tried this query to create druid table with hive but without success:

CREATE TABLE druid_table_1

(`__time` TIMESTAMP,`dimension1` STRING,`dimension2` STRING,`metric1` INT,`metric2` FLOAT)

STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler';

Oddly in a month ago, i was able to create druid tables with hive.

I am using HDP version 2.6.5.0-292 on google cloud plateform.

Thanks in advance for your help !

Regards