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

Tao Li commented on HIVE-14263:
-------------------------------

Thanks for your comments [~thejas].

Regarding #2, according to 
[doc|https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantLock.html#tryLock()]
 about tryLock, "If you want to honor the fairness setting for this lock, then 
use tryLock(0, TimeUnit.SECONDS) which is almost equivalent (it also detects 
interruption)." The only difference between tryLock() and tryLock(0, 
TimeUnit.SECONDS) is that the latter throws a InterruptionException. I don't 
think we really need to use tryLock(0, TimeUnit.SECONDS) except there is a 
convention there.

Regarding #5, I intentionally left out the "lock acquired" message to minimize 
the number of rows of messages before displaying the query result, since I 
think that's a little bit intrusive to the users. The original purpose of this 
change is to indicate the waiting status to the end users when the compilation 
task is waiting for the lock. So as long as we print out the waiting message, 
it should satisfy that purpose. In normal cases the query result should be 
displayed after lock is acquired, so I don't think the "lock acquired" message 
is really useful/necessary for the beeline users.

I will make changes based on other comments. They are good points.   

> Log message when HS2 query is waiting on compile lock
> -----------------------------------------------------
>
>                 Key: HIVE-14263
>                 URL: https://issues.apache.org/jira/browse/HIVE-14263
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>            Reporter: Thejas M Nair
>            Assignee: Tao Li
>         Attachments: HIVE-14263.1.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to