Options to monitor transactions
As a Hive administrator, you can view the list of all currently open and aborted
transactions using the
SHOW TRANSACTIONS statement or by querying the
TRANSACTIONS view within the
The query statements display the following details about transactions:
TXN_ID: Unique internal transaction ID
STATE: Transaction state
STARTED: Timestamp when the transaction was started
LAST_HEARTBEAT: Timestamp of the latest heartbeat
USER: Hive user who initiated the transaction
HOST: Host machine or virtual machine where the transaction was initiated
HEARTBEAT_COUNT: Total number of heartbeats
TYPE: Transaction type
TC_DATABASE: Hive database name
TC_TABLE: Table name
TC_PARTITION: Partition name (if the table is partitioned)
TC_WRITEID: Unique internal write ID
The following sections describe the various options that you can use to monitor transactions.
You can run the
SHOW TRANSACTIONS statement to view details about all open
and aborted transactions.
This statement lists all the transactions and you cannot filter or limit the results as required. Alternatively, you can use the SYS database to query and filter specific transactions.
Querying the SYS database
You can query the TRANSACTIONS view within the
SYS database to filter and
view specific transactions.
SELECT * FROM SYS.TRANSACTIONS WHERE STATE='aborted';