Oracle SQL Developer Version 18.1.0.095 on Windows 64bit and
Hive on Cloudera Hadoop CDH 5.12.x.
- First download and install the popular free tool Oracle SQL Developer for Windows from Oracle website.
- Read this blog for a good idea about connecting Oracle SQL Developer to Hadoop Hive: https://blogs.oracle.com/bigdataconnectors/move-data-between-apache-hadoop-and-oracle-database-with-sql-developer
- Note when configuring Cloudera-Hive JDBC drivers use the below website to download the 64bit JDBC driver for windows. https://www.cloudera.com/downloads/connectors/hive/jdbc/2-5-20.html
- In the Tools->Preferences->Database->Third party JDBC drivers add the .jar files from the JDBC driver download file ClouderaHiveJDBC-18.104.22.1680\ClouderaHiveJDBC41-22.214.171.1240 . (Note: If the Cloudera_HiveJDBC41 .jar files are not recognized by SQL Developer and the Hive connection is not enabled then try with the ClouderaHiveJDBC4 jars). Make sure to select all 10 or 15 .jar driver files and load into the tool not just the path.
- Apache Hive Connection setup:
- Click on the New Connection in SQL Developer
- Click on Hive tab. If the ‘Hive’ tab does not display next to the ‘Oracle’ tab it is likely that the Hive JDBC drivers did not install correctly. Load the
- Tools -> Preferences -> Database -> Third party JDBC drivers again.
- Give a connection name, username in Hive or Hue such as hive, Hostname of the hiverserver2, Port default is 10000, Database: default
- Test the connection if successful then Connect and you will see the Hive tables and will be able to run the SQL queries, import, export etc. on Hive from SQL Developer.
Following additional steps are needed for Kerberos secured Cloudera clusters
See the blogs below:
While testing the connection if you get an error such as:
Status : Failure -Test failed: [Cloudera][HiveJDBCDriver](500164) Error initialized or created transport for authentication: [Cloudera][HiveJDBCDriver](500169) Unable to connect to server: GSS initiate failed.
Then as given in the vijayt’s blog above, you need to copy your krb5.conf file to the folder sqldeveloper\jdk\jre\lib\security. You may need to download Unlimited Java Cryptography Extension files from Oracle Java website and copy (replace) local_policy.jar and US_export_policy.jar files to sqldeveloper\jdk\jre\lib\security directory inside sql developer installation.
Restart SQL Developer and Get a new token for the userid using MIT Kerberos GUI client. Test the Hive JDBC connection.