Created 09-25-2018 02:43 PM
As part of our project, we need to pull data from HIVE table. We are planning to setup the HIVE Datasource in our IBM WebSphere application server to connect to the HIVE. Can you provide the steps which I need to follow to setup that?
Details:
HDP 2.6.5
WAS 8.5
Regards,
Saravanan
Created 09-17-2021 09:58 AM
We dont have steps realted to IBM Websphere. I am going to provide generic steps :
As IBM Webspehre is a java application,so you need a JDBC driver to connect to hive.
1. Download the JDBC driver from Cloudera website
https://www.cloudera.com/downloads/connectors/hive/jdbc/2-6-15.html
2. Use the driver in the Websphere classpath and check using
lsof -p <webspehere pid> | grep <driver name> ==> igf it is loaded after adding
3. In Webspehere Datasource URL ,use hostname of hiveserver2 and port(probably 10000 if binary). The URL looks like as below:
jdbc:hive2://<hiveserver host>:10000/default
4. Test the datasource(I was handling Weblogic,and there is an option to test datasource URL)
5. If everything works good,test the application.
Note: Please check your Websphere documentation if Hive is a supported database before implementing the above action plan.
If your Webspeheis SSL and Kerberos enabled,then the jdbc URL would change,I would suggest to test with non-SSL Websphere.
Created 09-17-2021 07:37 AM
Did you found any solution , can you share
Created 09-17-2021 09:58 AM
We dont have steps realted to IBM Websphere. I am going to provide generic steps :
As IBM Webspehre is a java application,so you need a JDBC driver to connect to hive.
1. Download the JDBC driver from Cloudera website
https://www.cloudera.com/downloads/connectors/hive/jdbc/2-6-15.html
2. Use the driver in the Websphere classpath and check using
lsof -p <webspehere pid> | grep <driver name> ==> igf it is loaded after adding
3. In Webspehere Datasource URL ,use hostname of hiveserver2 and port(probably 10000 if binary). The URL looks like as below:
jdbc:hive2://<hiveserver host>:10000/default
4. Test the datasource(I was handling Weblogic,and there is an option to test datasource URL)
5. If everything works good,test the application.
Note: Please check your Websphere documentation if Hive is a supported database before implementing the above action plan.
If your Webspeheis SSL and Kerberos enabled,then the jdbc URL would change,I would suggest to test with non-SSL Websphere.
Created 09-21-2021 12:03 PM
Thank you for the solution , that helped a lot to connection using plain jdbc.
Can you help me with setting up Hive JNDI in Websphere .
if JDBC providers to be as User-defined then what will be the Implementation class name?
etc .
Created 09-22-2021 01:14 AM
You have to use com.cloudera.hive.jdbc.HS2Driver class for the driver.
I don't have expertise on Websphere ,I can not help with JNDI.