Support Questions
Find answers, ask questions, and share your expertise

Setup Hive Datasource in IBM WebSphere

New Contributor

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

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Setup Hive Datasource in IBM WebSphere

Expert Contributor

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.

 

 

 

 

 

 

 

View solution in original post

4 REPLIES 4

Re: Setup Hive Datasource in IBM WebSphere

New Contributor

Did you found any solution , can you share

Re: Setup Hive Datasource in IBM WebSphere

Expert Contributor

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.

 

 

 

 

 

 

 

View solution in original post

Re: Setup Hive Datasource in IBM WebSphere

New Contributor

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 .

 

Re: Setup Hive Datasource in IBM WebSphere

Expert Contributor

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.