Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jdbc settings for connecting to Impala

Tags:

jdbc

hive

impala

What is the combination of driver and jdbc URL to use for CDH5 (I am on CDH5.3)?

I have tried a few including:

jdbc:hive2://myserver:21050/;auth=noSasl

And with the following driver:

org.apache.hive.jdbc.HiveDriver

I have added

   /opt/cloudera/parcels/CDH/lib/impala/lib/*:/opt/cloudera/parcels/CDH/lib/hive/lib/*

to the classpath (but still no success)

The result is:

java.sql.SQLException: No suitable driver found for jdbc:hive2://myserver:20150/;auth=noSasl
like image 755
WestCoastProjects Avatar asked Mar 06 '15 04:03

WestCoastProjects


People also ask

What is Impala JDBC driver?

The Cloudera JDBC Driver for Impala enables your enterprise users to access Hadoop data through Business Intelligence (BI) applications with JDBC support.


1 Answers

Firstly, make sure you're using the correct driver. You should use the Impala JDBC driver (rather than the Hive driver).

Then you should be able to use the com.cloudera.impala.jdbc3.Driver driver with a connection string like: jdbc:impala://host:21050

The Impala JDBC driver guide has more details and examples.

like image 185
Matt Avatar answered Sep 19 '22 16:09

Matt