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.

not able to create table hive table with druid

not able to create table hive table with druid

Guru

When I am trying to create table in hive with druid class:

CREATE EXTERNAL TABLE test STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler' TBLPROPERTIES ("druid.datasource" = "Sterlingtest");

INFO: Compiling command(queryId=hive_20180926065925_e6e18cbb-19f7-4169-bd6e-78d5e5b00719): CREATE EXTERNAL TABLE test STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler' TBLPROPERTIES ("druid.datasource" = "Sterlingtest")

INFO: We are setting the hadoop caller context from HIVE_SSN_ID:c8ef6dc7-ff31-4f5a-bd1e-81f7ba01ff4d to hive_20180926065925_e6e18cbb-19f7-4169-bd6e-78d5e5b00719

ERROR : FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException Connected to Druid but could not retrieve datasource information)

2 REPLIES 2

Re: not able to create table hive table with druid

@Saurabh

Do you have the datasource "Sterlingtest" available under Druid coordinator UI?

If yes, then check the hive-druid configurations under Ambari -> Hive configs and see if broker and coordinator addresses are configured properly.

Highlighted

Re: not able to create table hive table with druid

Guru

Yes @Sindhu I can see datasource "Sterlingtest" in superset but surprisingly when I logged into mysql backend and queried then I do not see any data source in that.

91554-screen-shot-2018-09-26-at-54202-pm.png

mysql> select * from druid_dataSource;

Empty set (0.00 sec)

mysql> show databases;

+--------------------+

| Database |

+--------------------+

| information_schema |

| druid|

+--------------------+

2 rows in set (0.00 sec)

mysql> show tables;

+-----------------------+

| Tables_in_druid |

+-----------------------+

| druid_audit |

| druid_config|

| druid_dataSource|

| druid_pendingSegments |

| druid_rules |

| druid_segments|

| druid_supervisors |

| druid_tasklocks |

| druid_tasklogs|

| druid_tasks |

+-----------------------+

10 rows in set (0.00 sec)

mysql> select * from druid_audit;

Empty set (0.00 sec)

mysql> select * from druid_pendingSegments;

Empty set (0.01 sec)

mysql> select * from druid_rules;

+-----------------------------------+------------+--------------------------+-----------------------------------------------------------------+

| id| dataSource | version| payload |

+-----------------------------------+------------+--------------------------+-----------------------------------------------------------------+

| _default_2018-08-29T09:47:21.779Z | _default | 2018-08-29T09:47:21.779Z | [{"tieredReplicants":{"_default_tier":2},"type":"loadForever"}] |

+-----------------------------------+------------+--------------------------+-----------------------------------------------------------------+

1 row in set (0.00 sec)

mysql>