2

I want to integrate spring with hive when I try to add the jar files in my project I came across Apache hive-JDBC jar and Cloudera hive-JDBC jar. What is the difference between both jars?

This is Apache hive-JDBC maven dependency:

<dependency>
  <groupId>org.apache.hive</groupId>
  <artifactId>hive-jdbc</artifactId>
  <version>3.1.2</version>
</dependency>

where can I find Cloudera hive-jdbc dependency?

Goutham Harshith
  • 238
  • 2
  • 16

1 Answers1

2

Cloudera's Hive JDBC driver jar is meant for Cloudera Distribution of Hadoop (CDH). Unless you are running CDH cluster, you should not be using CDH specific jars.

The artifacts are available in maven repository under cloudera repos, or can be downloaded from Cloudera itself. The jar version will include the corresponding CDH version for which it can be used.

<dependency>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive-jdbc</artifactId>
    <version>2.1.1-cdh6.3.3</version>
</dependency>

Note: CDH might not have the latest versions of the components as you may find in Apache's distribution.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
franklinsijo
  • 17,784
  • 4
  • 45
  • 63
  • Thanks for your response, but when I am using this dependency in my pom.xml I am facing this issue "Missing artifact org.apache.hive:hive-jdbc:jar:2.1.1-cdh6.3.3". – Goutham Harshith Apr 17 '20 at 05:00
  • That is the latest available in mvn. Try to do a force update or try for a different version from the link in answer. – franklinsijo Apr 17 '20 at 05:14
  • still, I am facing the same problem. Can you drop any snippets for reference? – Goutham Harshith Apr 17 '20 at 09:14
  • I am able to download the corresponding jar. Try to update your project after doing a `mvn clean`. If that does not work, try solutions listed [here](https://stackoverflow.com/questions/18108080/errors-in-pom-xml-with-dependencies-missing-artifact) – franklinsijo Apr 17 '20 at 13:50