Skip to main content
suihe
Silver ⭐️
August 30, 2023
Solved

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

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

ChethanYM
ChethanYMAnswer
Gold ⭐️
September 5, 2023

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

 

 

6 replies

VidyaSargur
Community Manager
Community Manager
August 30, 2023

@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.

Translate
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.
ChethanYM
Gold ⭐️
Gold ⭐️
August 30, 2023

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

Translate
suihe
suiheAuthor
Silver ⭐️
August 31, 2023

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

Translate
ChethanYM
Gold ⭐️
ChethanYMAnswer
Gold ⭐️
September 5, 2023

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

 

 

Translate
littlecong
Silver ⭐️
September 6, 2024

```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)

 

Translate