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.

Hive druid Integration Issue -org.apache.hadoop.hive.druid.DruidStorageHandle error

Highlighted

Hive druid Integration Issue -org.apache.hadoop.hive.druid.DruidStorageHandle error

I'm trying to create a hive external table to point to an existing druid table, but getting below error. I have "hive-druid-handler-2.1.0.2.6.1.0-129.jar" is present in /usr/hdp/2.6.1.0-129/hive2/lib directory. Is this due to old version of hive-druid-handler-.jar present in hive classpath? how do I fix it? Thank you!

hive> CREATE EXTERNAL TABLE druid_table_pageviews2 STORED BY 'org.apache.hadoop.hive.druid.DruidStorageHandler' TBLPROPERTIES ("druid.datasource" = "pageviews2"); FAILED: SemanticException Cannot find class 'org.apache.hadoop.hive.druid.DruidStorageHandler' hive>

9 REPLIES 9
Highlighted

Re: Hive druid Integration Issue -org.apache.hadoop.hive.druid.DruidStorageHandle error

Hi @Winnie Philip

You should be using Hive Interactive (with LLAP) to use the Druid integration.

I am not sure if this constraint is valid for non secure clusters. I'll test it this weekend if I have time.

In the meantime, you should be able to achieve this using the Hive interactive instance.

Thanks

Highlighted

Re: Hive druid Integration Issue -org.apache.hadoop.hive.druid.DruidStorageHandle error

Expert Contributor

Hi this exception occurs when you are not using Hive2 interactive. All the Druid integration works only with Hive2 interactive, make sure to connect via the interactive url.

Highlighted

Re: Hive druid Integration Issue -org.apache.hadoop.hive.druid.DruidStorageHandle error

Expert Contributor
Highlighted

Re: Hive druid Integration Issue -org.apache.hadoop.hive.druid.DruidStorageHandle error

Thank you! I'm able to create druid external table from beeline via connecting to hive2 interactive URL. But this table is not accessible from Hive2 Shell prompt or Ambari Cli. Is there anything I can install to get Amabri Cli to access Druid table?

java.lang.Exception: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: RuntimeException org.apache.hadoop.hive.ql.metadata.HiveException: Error in loading storage handler.org.apache.hadoop.hive.druid.DruidStorageHandler

java.lang.Exception: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: RuntimeException org.apache.hadoop.hive.ql.metadata.HiveException: Error in loading storage handler.org.apache.hadoop.hive.druid.DruidStorageHandler
	at org.apache.ambari.view.hive20.resources.jobs.JobService.getOne(JobService.java:147)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
Highlighted

Re: Hive druid Integration Issue -org.apache.hadoop.hive.druid.DruidStorageHandle error

Expert Contributor

Most of those CLIs you are referring to are deprecated. Please refer to this post to read about the differences

https://community.hortonworks.com/questions/135182/hive-cli-vs-beeline.html

Highlighted

Re: Hive druid Integration Issue -org.apache.hadoop.hive.druid.DruidStorageHandle error

Thank you! Is there a way for me to install & start beeline client on a machine outside of HDP 2.6 cluster nodes, for ex, on my laptop? I have downloaded all needed jar files from HDP distribution.

\hive2_2_6_1_0_129-jdbc-2.1.0.2.6.1.0-129.noarch\hive2_2_6_1_0_129-jdbc-2.1.0.2.6.1.0-129.noarch\usr\hdp\2.6.1.0-129\hive2\lib

Highlighted

Re: Hive druid Integration Issue -org.apache.hadoop.hive.druid.DruidStorageHandle error

@Winnie Philip

You can use any tool that connect with JDBC and use it outside of your cluster. Just use the JDBC connector.

Highlighted

Re: Hive druid Integration Issue -org.apache.hadoop.hive.druid.DruidStorageHandle error

Thank you, very much!

I tried Squirel SQL tool. Added client libraries, and JDBC driver libraries, but getting below error.

java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.sql.SQLException: Could not establish connection to jdbc:hive2://yyyyyrpmaster.xxx.local:10000/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2: Required field 'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, configuration:{use:database=default})
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:206)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115)

Re: Hive druid Integration Issue -org.apache.hadoop.hive.druid.DruidStorageHandle error

Rising Star
@Winnie Philip

When we are trying to connect to HiveServer2Interactive via ZookeeperName space, the url should contain list of zookeeper servers uris, also use correct ZookeeperName space (check in Advanced hive-interactive-site) eg: hiveserver2-hive2.

Unsecure:

jdbc:hive2://<zkhost1>:2181,<zkhost2>:2181,<zkhost3>:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2-hive2

Secure:

jdbc:hive2://<zkhost1>:2181,<zkhost2>:2181,<zkhost3>:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2-hive2;principal=hive/_HOST@XYZ.COM

**principal=hive/_HOST@XYZ.COM --> sample hive (service user) Kerberos Principal

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