Created 10-03-2015 12:22 AM
I would like to use SquirrelSQL or Oracle SQL Developer or another SQL tool to connect to Hive via JDBC. Where do I find the Hive JDBC Client?
Created 10-03-2015 01:45 AM
@dstreever@hortonworks.com has a nice write up on this, including a script that pulls together the needed jars, on his wiki at https://streever.atlassian.net/wiki/x/DABD.
Created 10-03-2015 12:33 AM
FOR HDP 2.2.x From /usr/hdp/current/hive-client/lib/ sftp or scp to your local desktop
FOR HDP 2.3.x
From /usr/hdp/current/hive-client/lib/ sftp or scp to your local desktop
FOR BOTH
From /usr/hdp/current/hadoop-client
From /usr/hdp/current/hadoop-client/lib
Download SquirrelSQL from sourceforge.net
http://squirrel-sql.sourceforge.net/
Configure Hive Driver in Squirrel SQL
Add a New Hive Connection Alias for HDP 2.3
Oracle SQL Developer and Toad for Apache Hadoop does not use Apache Hive JDBC Driver. They are both black boxes that hide the the ability to easily point to a JDBC class path and just end whatever JDBC properties you desire.
So if you need to add special properties for ssl, or kerberos or ldap authentication, neither SQL Developer nor Toad will work.
Use SQL Workbench J, RazorSQL or Squirrel SQL instead.
Created 10-03-2015 01:45 AM
@dstreever@hortonworks.com has a nice write up on this, including a script that pulls together the needed jars, on his wiki at https://streever.atlassian.net/wiki/x/DABD.
Created on 02-16-2016 08:45 PM - edited 08-19-2019 05:59 AM
I have tested this and this is the best/easy way to configure the connection
Created 10-05-2015 05:13 PM
Starting with Hive 0.14, there is a standalone jar that contains most of the necessary binaries. It still currently requires two additional jars until HIVE-9600 is resolved:
See http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.0/bk_dataintegration/content/hive-jdbc-odbc-dr... for details.
Created 04-25-2016 02:03 PM
I have HDP 2.3 sandbox in my server, I followed you instruction to setup the connection for squirrel sql, I got under exception:
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration 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) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:175) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104) ... 5 more Caused by: java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration at org.apache.hive.jdbc.HiveConnection.createUnderlyingTransport(HiveConnection.java:418) at org.apache.hive.jdbc.HiveConnection.createBinaryTransport(HiveConnection.java:438) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:179) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:152) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167) ... 7 more Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.conf.Configuration at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 14 more
can you please help?
Thanks
Created 05-18-2016 01:47 PM
@Ancil McBarnett check out the repo i've been maintianing that uses maven to pull the required jars.
https://community.hortonworks.com/repos/33592/hive-jdbc-uber-jar.html