Git Product home page Git Product logo

hive-jdbc-uber-jar's People

Contributors

abaybektursun avatar dependabot-preview[bot] avatar dependabot[bot] avatar timveil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hive-jdbc-uber-jar's Issues

Cannot connect to Hive database with Zookpeer Discovery enabled

Hi,

I am trying to connect to Hive from dbeaver using library -

https://github.com/timveil/hive-jdbc-uber-jar/releases/download/v1.9-2.6.5/hive-jdbc-uber-2.6.5.0-292.jar

The database has zookeeper discovery enabled.
But the connection fails with below error:

org.apache.hive.jdbc.ZooKeeperHiveClientException: Unable to read HiveServer2 configs from ZooKeeper
Unable to read HiveServer2 configs from ZooKeeper
Unable to read HiveServer2 configs from ZooKeeper
A HostProvider may not be empty!

The hostname looks like this -

zookeeperhost1:2181,zookeeperhost12:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2

I am able to connect to the same host using beeline.
Can you please let me know if I am missing something?
Thanks!

SLF4J dependency in DbVisualizer

trying to update hive-jdbc-uber-jar in DbVisualizer 10 throws following exception on connection:

An error occurred while establishing the connection:

Details:
   Type: java.lang.reflect.UndeclaredThrowableException

Stack Trace:
java.lang.IllegalStateException: org.slf4j.LoggerFactory in failed state. Original exception was thrown EARLIER. See also http://www.slf4j.org/codes.html#unsuccessfulInit
   at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:422)
   at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
   at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
   at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:290)
   at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:111)
[wrapped] java.lang.ExceptionInInitializerError
   at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.onseven.dbvis.g.B.D.ā(Z:1548)
   at com.onseven.dbvis.g.B.F$A.call(Z:1369)
[wrapped] java.lang.Exception: java.lang.ExceptionInInitializerError
   at com.onseven.dbvis.g.B.F$A.call(Z:2374)
   at java.util.concurrent.FutureTask.run(Unknown Source)
[wrapped] java.lang.reflect.UndeclaredThrowableException
   at com.sun.proxy.$Proxy0.connect(Unknown Source)
   at com.onseven.dbvis.db.I.H.Ŋ(Z:2070)
   at com.onseven.dbvis.db.I.H.Ĵ(Z:1692)
   at com.onseven.dbvis.db.I.K.Ĵ(Z:3063)
   at com.onseven.dbvis.db.I.D.ĥ(Z:1756)
   at com.onseven.dbvis.K.C.W.ğ(Z:503)
   at com.onseven.dbvis.K.C.J.Ă(Z:1374)
   at com.onseven.dbvis.K.C.J.doInBackground(Z:1521)
   at javax.swing.SwingWorker$1.call(Unknown Source)
   at java.util.concurrent.FutureTask.run(Unknown Source)
   at javax.swing.SwingWorker.run(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

used version: hive-jdbc-uber-2.6.2.0-205.jar
using the earlier version hive-jdbc-uber-2.6.1.0-129.jar works just fine

Log4J Security Question

Hey Tim,

I want to make sure Log4J, if included here, is not in versions mentioned in CVE-2021-44228 but have had trouble tracking down dependencies in the final jar. I saw in a previous Issue that you removed log4j, but in the readme it seems to suggest log4j is included. Could you comment?

HIVE 1.1.0 JDBC

支持HIVE 1.10 是哪个版本呢?最新版无法支持

Using your jar with DBVisualizer to hit HDP cluster

Tim - first, many thank yous for your initiative. I'm sure this is relieving a lot of pain for a lot of people - i.e., fixing Hadoop version problem, packaging all these into a file, etc.

I believe I have tried all JDBC drivers under the sky - Simba, Impala, jars from my Hadoop cluster - and now yours. All gives me an error that is similar in nature.

Background

  1. we're on a HDP 2.2 cluster running HiveServer2. I can connect via beeline (JDBC) from another Unix node to HiveServer2 without any issues.
  2. I can connect from Windows via ODBC without any problems - i.e. using Tableau + MIT Kerberos to connect
  3. We assume service principals to connect to HiveServer2. i.e. In MIT Kerberos my principal name is [email protected], but the hive service principal is hive/[email protected]

However, I dream of using a modern GUI SQL tool on Windows to do some of my work. Currently I'm using DBVisualizer.

I have followed your instructions - setting the JVM properties, adding your jar - but end up with the following error when I connect
Database URL=jdbc:hive2://myserver.mydomain.com:10000/default;principal=hive/[email protected]

Long Message:
Could not open client transport with JDBC Uri: : GSS initiate failed

Details:
   Type: java.sql.SQLException
   SQL State: 08S01

Many thanks in advance,
Alex

org.apache.log4j.Level

I got this following error when using version 2.6.2.0-205 in DataGrip.

java.lang.ClassNotFoundException: org.apache.log4j.Level
	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)
	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:290)
	at org.apache.hive.jdbc.HiveConnection.<clinit>(HiveConnection.java:111)
	at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
	at com.intellij.database.remote.jdbc.impl.RemoteDriverImpl.connect(RemoteDriverImpl.java:27)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
	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) (no stack trace).
java.lang.NoClassDefFoundError: org/apache/log4j/Level

When i try to use 2.6.1.0-129, test connection was successful but it said "method not supported" maybe because i'm using HDP 2.6.2.0-205

support for knox

how can Knox be used in a kerberised setup with i.e. DataGrip to connect Hive JDBC?

add support for embedded mode.

recommended additional jars include:

  • hive-exec*.jar
  • hive-metastore*.jar
  • antlr-runtime-3.0.1.jar
  • derby.jar
  • jdo2-api-2.1.jar
  • jpox-core-1.2.2.jar
  • jpox-rdbms-1.2.2.jar

Connecting to Hive using Uber JDBC via SSH

Hello,

Is it possible to connect to Kerberized Hive using Uber JDBC and DataGrip via SSH? I'm assuming I'd need to put ssh login/pwd into template, but what are the identifiers for ssh information?
Thanks in advance!

Connect to Secure Hive

How can I connect with HiVe that is secured with Kerberos and SASL?
For beeline I use following string connection:
beeline -u "jdbc:hive2://ServerName:10000/default;principal=hive/ServerName@REALM;saslQop=auth-conf"

Thanks,
Andrzej

log4j included?

Trying to use this jar with Apache Zeppelin, I got the error:

java.lang.IllegalStateException: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError.

Is log4j included in your uber jar?

ClassNotFoundException: org.apache.commons.codec.binary.Base64

Does not seem to include all dependencies:

java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64
    at org.apache.http.impl.auth.BasicScheme.authenticate(BasicScheme.java:168)
    at org.apache.hive.jdbc.HttpBasicAuthInterceptor.addHttpAuthHeader(HttpBasicAuthInterceptor.java:52)
    at org.apache.hive.jdbc.HttpRequestInterceptorBase.process(HttpRequestInterceptorBase.java:74)
    at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:132)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:182)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.execchain.ServiceUnavailableRetryExec.execute(ServiceUnavailableRetryExec.java:84)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:117)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
    at org.apache.thrift.transport.THttpClient.flushUsingHttpClient(THttpClient.java:251)
    at org.apache.thrift.transport.THttpClient.flush(THttpClient.java:313)
    at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:73)
    at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:62)
    at org.apache.hive.service.cli.thrift.TCLIService$Client.send_OpenSession(TCLIService.java:154)
    at org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:146)
    at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:552)
    at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:170)
    at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
    at java.sql.DriverManager.getConnection(DriverManager.java:664)
    at java.sql.DriverManager.getConnection(DriverManager.java:208)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.codec.binary.Base64
    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)
    ... 26 more

HIve Uber JDBC Jar Work with Hive LLAP

Hey ,

Wanted to check with you , for the compatibility of creating this process for hive LLAP . Does the Jar produced here work with Hive LLAP as well ???

Maven artifact

Hey,

I'm from https://github.com/dbeaver/dbeaver/ team.
We are using hive uber jar for some time (thanks for it!) and it actually rocks (https://github.com/dbeaver/dbeaver/wiki/Apache-Hive). For UI client it is a life saver. DBeaver supports downloading of Maven artifacts (and most of publicly available drivers are downloaded directly from Maven Central) but for standard Hive driver it takes like forever to download these hundreds of jars.

For now I've hardcoded direct http link on one of the latest uber-jar releases on GitHub. This works but it is not very cool as users can't choose the most recent or some older version.
While for Maven artifacts DBeaver shows all available versions and allows user to choose one.

How do you think - is it possible to put uber-jar in a public Maven repository?

Also I noticed that you are making your own Hive driver - looks very interesting. I could add it to DBeaver config at some moment but again - it would be great to have it in Maven repository (any public repository, Maven Central is not a requirement).

Thank you very much,
Serge

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.