Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

java jdbc Request impala How do I get the queryId of the impala?

avatar
New Contributor

My service is to forcibly interrupt the impala query, but the interrupt requires queryId, impala driver does not find the corresponding method, jdbc does not see queryId return, driver log level LogLevel=6, and queryId is not seen

1 ACCEPTED SOLUTION

avatar
Master Collaborator

Hi,

I do not think query id will be present in jdbc driver logs( I have not tested it), It will be present in impalad INFO logs( server side). If you already tested and found query id is not present in driver logs then we cannot make it work other than getting the id from server logs.

Get the query id in server logs and search it in driver logs for confirmation.

Regards,
Chethan YM

 

 

View solution in original post

6 REPLIES 6

avatar
Community Manager

@suihe, Welcome to our community! To help you get the best possible answer, I have tagged in our Impala experts @ChethanYM @willx  who may be able to assist you further.

Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Master Collaborator

Hello,

 

May i know what is the exact issue? Can you attach the error stack trace OR screenshots? If the connection itself is failing then we do not get the query id. If the connection is succeeded and query is failing then we can see the query profile in the CM -> Impala -> queries section. OR atleast we can see the query id in the impala coordinator logs.

 

Regards,

Chethan YM

avatar
New Contributor

hello

 

This is a spring boot project that connects to impala through jbdc for a query, and I want to get the queryId of impala's query. It seems that the driver method has no corresponding data return. So I do not know how to get, impala server log will have a corresponding print, but that is the server, my program can not read the server log file. Please help to see if there is a way to get it, thank you

avatar
Master Collaborator

Hi,

I do not think query id will be present in jdbc driver logs( I have not tested it), It will be present in impalad INFO logs( server side). If you already tested and found query id is not present in driver logs then we cannot make it work other than getting the id from server logs.

Get the query id in server logs and search it in driver logs for confirmation.

Regards,
Chethan YM

 

 

avatar
Master Collaborator

Hello,

Do you have any other concerns on the above response? have you tried that for a confirmation?

Regards,

Chethan YM

avatar
New Contributor

```java

private static String JDBC_DRIVER = "com.cloudera.impala.jdbc.Driver";
private static String CONNECTION_URL ="jdbc:impala://127.0.0.1:21050/;LogLevel=5;UseNativeQuery=1";

```

Found in logs 

```log

Adding THandleIdentifier(guid:52 BF 8E A3 7D E8 47 B6 00 00 00 00 3B FB 5C 30, secret:29 1B CE 80 42 7C 45 91 93 B8 4E 77 56 C3 0E D6) to the heart beat operation handle list.

```

the guid is something about query id in profile 

Query (id=b647e87da38ebf52:305cfb3b00000000)