Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudera Impala JDBC support? #179

Open
jqtruong opened this issue Jul 21, 2023 · 4 comments
Open

Cloudera Impala JDBC support? #179

jqtruong opened this issue Jul 21, 2023 · 4 comments

Comments

@jqtruong
Copy link

jqtruong commented Jul 21, 2023

hello, i'm not sure what i'm doing wrong but upon ejc-connect, i get:

Connection started...
[nREPL] Starting server via /usr/local/bin/lein update-in :dependencies conj \[nrepl/nrepl\ \"1.0.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.32.0-alpha3\"\] -- repl :headless :host localhost
Starting nREPL server for ejc-sql...
[nREPL] server started on 61233
[nREPL] Establishing direct connection to localhost:61233 ...
[nREPL] Direct connection to localhost:61233 established
error in process filter: split-string: Wrong type argument: stringp, nil
error in process filter: Wrong type argument: stringp, nil
Connected! The only way of discovering the limits of the possible is to venture a little way past them into the impossible. -Arthur C. Clarke

and my connection is:

(ejc-create-connection
 "a-conn"
  :connection-uri "jdbc:impala:/my.server.com:21050?db=some_db&user=myuser&password=mypass;AuthMech=3;SSL=1;UseNativeQuery=1;"
 :classpath "<some path>/cloudera-jdbc-drivers/lib/2.6.30.1036/ImpalaJDBC42-2.6.30.1036.jar"
 )

it says i'm connected at the end but there is no buffer for me to run queries. Might y'all know what i'm doing wrong?

@jqtruong
Copy link
Author

jqtruong commented Jul 24, 2023

actually, i found the result-file and saw another error:

Error: No suitable driver found for jdbc:impala://my.impala.server:21050;AuthMech=3;SSL=1;UseNativeQuery=1;

@jqtruong
Copy link
Author

my updated connection config:

 :classpath "<path to jar>/cloudera-jdbc-drivers/lib/2.6.30.1036/ImpalaJDBC42-2.6.30.1036.jar"
 :classname "com.cloudera.impala.jdbc.Driver"
 :connection-uri "jdbc:impala://my.impala.server:21050;AuthMech=3;SSL=1;UseNativeQuery=1;"

i also added config for :dbname, :user, and :password but not necessary to show y'all that. FYI, the user and pw in the connection string would be: UID and PWD.

@jqtruong
Copy link
Author

the issue with the split string is because i didn't put the jdbc jar under ~/.m2/repository/ so that's fixed, and the error in the backtrace now is:

error in process filter: Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:445).
com.cloudera.impala.jdbc.Driver

but i see the class if i unzip the jar, at: com/cloudera/impala/jdbc/Driver.class.

@kostafey
Copy link
Owner

@jqtruong unfortunately, I don't have Cloudera Impala database installed. Could you please try to use dependencies instead of classpath in the configuration:

:dependencies [[Impala/ImpalaJDBC42 "2.6.26.1031"]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants