[ 
https://issues.apache.org/jira/browse/HIVE-22553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16983609#comment-16983609
 ] 

Zoltan Chovan commented on HIVE-22553:
--------------------------------------

Example queries:

Show information about open transactions and related locks with 
db/table/partition info:
{code:java}
select l.`txnid`, l.`db`, l.`table`, l.`partition`, l.`lock_state`, 
l.`lock_type`, l.`user`, l.`host`, t.`state`, t.`started`, 
t.`tc_operation_type`, t.`last_heartbeat`
from locks as l
left join transactions as t on t.`txn_id` = l.`txnid`
where t.`state` like 'open';{code}
Show compaction related transactions:
{code:java}
select * from transactions where TXN_TYPE like "COMPACTION";{code}

> Expose locks and transactions in sys db
> ---------------------------------------
>
>                 Key: HIVE-22553
>                 URL: https://issues.apache.org/jira/browse/HIVE-22553
>             Project: Hive
>          Issue Type: Improvement
>    Affects Versions: 4.0.0
>            Reporter: Zoltan Chovan
>            Assignee: Zoltan Chovan
>            Priority: Major
>         Attachments: HIVE-22553.patch
>
>
> Create new sysdb tables/views to access lock and transaction data.
> This allows to provide admins with live data about ongoing locks and 
> transacions. Due to this being in the sys db access to this information can 
> be restricted to select privileged users.
> Information about locks and compactions can be joined and accessed at the 
> same time.
> Compaction related transactions would also be visible.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to