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

Peter Vary commented on HIVE-16334:
-----------------------------------

Thanks for the reviews [~stakiar], [~ekoifman]!

@sahil: The user can query the detailed lock information by the {{show locks 
customers extended;}}
It will output this:
{code}
+----------------------------------------------------+---------+--+
|                      tab_name                      |  mode   |
+----------------------------------------------------+---------+--+
| default@customers                                  | SHARED  |
| LOCK_QUERYID:hive_20170331023232_0a132ae3-d304-4b29-950f-68dce115bb9a | NULL  
  |
| LOCK_TIME:1490952750561                            | NULL    |
| LOCK_MODE:IMPLICIT                                 | NULL    |
| LOCK_QUERYSTRING:select * from customers c1 join customers c2 on c1.id=c2.id 
| NULL    |
+----------------------------------------------------+---------+--+
{code}

This helps the user to understand why is the table locked. I think it is good 
to have the possibility to print the actual query string, but truncate it. What 
do you think?

Peter

> Query lock contains the query string, which can cause OOM on ZooKeeper
> ----------------------------------------------------------------------
>
>                 Key: HIVE-16334
>                 URL: https://issues.apache.org/jira/browse/HIVE-16334
>             Project: Hive
>          Issue Type: Improvement
>          Components: Locking
>            Reporter: Peter Vary
>            Assignee: Peter Vary
>         Attachments: HIVE-16334.patch
>
>
> When there are big number of partitions in a query this will result in a huge 
> number of locks on ZooKeeper. Since the query object contains the whole query 
> string this might cause serious memory pressure on the ZooKeeper services.
> It would be good to have the possibility to truncate the query strings that 
> are written into the locks



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to