Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Impala queries through impala JDBC is running with empty user

Solved Go to solution

Re: Impala queries through impala JDBC is running with empty user

Super Collaborator

Already tried this, I don't know how some can run query without user.

 

When i'm looking at CM i see akot of queries running with empty user and cann't localize the queries source and user, which make me hesitate to stop impala at my production cluster.

Re: Impala queries through impala JDBC is running with empty user

Super Collaborator

Anyone here who is familiar with apache zeppelin?

Re: Impala queries through impala JDBC is running with empty user

Super Collaborator

Any help?

Re: Impala queries through impala JDBC is running with empty user

Expert Contributor

Hi Fawze,

 

what version of the Impala JDBC driver are you using? What did you already try? The documentation of the latest version of the JDBC driver does not mention a "SID" parameter, but your connection string does. However, the documentation describes a "UID" parameter. Can you try using that one instead?

 

Cheers, Lars

Re: Impala queries through impala JDBC is running with empty user

Super Collaborator

Hi Lars,

 

In your comments before you asked me to check the UID and i mentioned the version 'm using, unfortunately, it doesn't work.

Re: Impala queries through impala JDBC is running with empty user

Expert Contributor

Hi Fawze,

 

That version should have been downloaded from Cloudera and as such the downloaded file comes with its own version number. The current version is 2.5.36. "ImpalaJDBC4.jar" is the name of the file, not the version.

 

What is the connection string you used? What was the error you received?

 

Thanks, Lars

Re: Impala queries through impala JDBC is running with empty user

Super Collaborator

jdbc:impala://ropr-dhc001:21050/;UID=fawze

 

Cloudera_ImpalaJDBC_2.5.5.1007.zip

 

No erros but the queries are running without user.

Re: Impala queries through impala JDBC is running with empty user

Expert Contributor

Your version of the driver seems to be 2.5.5. The current version is 2.5.36 and can be found here: http://www.cloudera.com/downloads/connectors/impala/jdbc/2-5-36.html

 

Please try again with the latest version and see if that help. The UID parameter should be supported there.

Re: Impala queries through impala JDBC is running with empty user

New Contributor
Using Cloudera JDBC41_2.5.38.

Tried various combinations but no luck using JDBC, user is empty.

DataSource ds = new com.cloudera.impala.jdbc41.DataSource();
ds.setURL("jdbc:impala://<host>:21050;UseSasl=0;UID=test;AuthMech=0");
ds.setUserID("test");
ds.setLoginTimeout(60);
ds.setCustomProperty("UID", "test");
ds.setCustomProperty("USER", "test");
ds.setLogLevel(LogLevel.TRACE.toString());
ds.setLogDirectory("C:\\temp\\impala_log");
String sql = "select ....";

try (Connection connection = ds.getConnection(); ResultSet rs = connection.createStatement().executeQuery(sql) {

// print

We do not have authentication turned on so I do get result back but "user" is empty on impalad host http://<impaladhost>:25000/queries
25000/queries



I see that in python -> impala/hiveserver2.py it tries to read from os environment variable ('USER', 'USERNAME') etc.
I tried to do TRACE log for cloudera but could not make much sense of logs.

If I use hue from cloudera manager then I do see user in impalad.

Any idea what can I do in Java JDBC without turning on User or User/Password authentication.
 

Re: Impala queries through impala JDBC is running with empty user

New Contributor

I have exactly the same empty username issue. My driver is Impala JDBC v2.5.41 and I am not using username/password authentication. Not having the user name makes searching queries by user impossible. Anyone here can help?