You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Taraka Rama Rao Lethavadla (Jira)" <ji...@apache.org> on 2025/10/08 14:12:00 UTC

[jira] [Created] (HIVE-29254) Display TxnId associated with the query in show processlist command

Taraka Rama Rao Lethavadla created HIVE-29254:
-------------------------------------------------

             Summary: Display TxnId associated with the query in show processlist command
                 Key: HIVE-29254
                 URL: https://issues.apache.org/jira/browse/HIVE-29254
             Project: Hive
          Issue Type: Improvement
            Reporter: Taraka Rama Rao Lethavadla
            Assignee: Taraka Rama Rao Lethavadla


Today we don't have a way to identify the query id along with the associated txn id.

Show transactions provide
{noformat}
+-----------------+--------------------+----------------+----------------------+----------------------------------------------------+--------------------------------------------+
|      txnid      |       state        |  startedtime   |  lastheartbeattime   |                        user                        |                    host                    |
+-----------------+--------------------+----------------+----------------------+----------------------------------------------------+--------------------------------------------+
| Transaction ID  | Transaction State  | Started Time   | Last Heartbeat Time  | User                                               | Hostname                                   |
| 37              | OPEN               | 1759478145278  | 1759478145278        | hive/ip-10-17-78-194.support.fuse.cloudera.com@SUPPORT.FUSE.CLOUDERA.COM | ip-10-17-78-194.support.fuse.cloudera.com  |
+-----------------+--------------------+----------------+----------------------+----------------------------------------------------+--------------------------------------------+{noformat}
Here we don't know the query id and not sure if we retrieve it and display in the above command

 

Show processlist gives below data
{noformat}
0: jdbc:hive2://localhost:10000> show processlist;
+------------+------------+-------------------+---------------------------------------+--------------------------+------------------------+----------------------------------------------------+-----------+-------------------+-------------------+---------------+-----------------+
| User Name  |  Ip Addr   | Execution Engine  |              Session Id               | Session Active Time (s)  | Session Idle Time (s)  |                      Query ID                      |   State   | Opened Timestamp  | Elapsed Time (s)  |  Runtime (s)  |      Query      |
+------------+------------+-------------------+---------------------------------------+--------------------------+------------------------+----------------------------------------------------+-----------+-------------------+-------------------+---------------+-----------------+
| hive       | 127.0.0.1  | mr                | 6cdf027f-90e1-48af-b4d8-a11aac71ca1b  | 154                      | 19                     | rtrivedi_20240624193743_fb4b2bf8-a02a-4b76-a92c-4e3ee4bb6e9e | FINISHED  | 1719275863493     | 102               | 83            | show tables     |
| hive       | 127.0.0.1  | mr                | 43945f54-d65c-424d-b523-08e7675d8223  | 165                      | 67                     | rtrivedi_20240624193826_42bff3ed-fb8d-4478-9500-fc6ff2173041 | RUNNING   | 1719275906721     | 59                | Not finished  | show databases  |
+------------+------------+-------------------+---------------------------------------+--------------------------+------------------------+----------------------------------------------------+-----------+-------------------+-------------------+---------------+-----------------+
2 rows selected (4.149 seconds){noformat}
We can try to display transaction id in this command, so that we can map transaction details from the show transactions output

 

Customer use case:

Some transactions are hanging for long, but they don't know the query corresponding to that txn id before aborting that manually

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)