[
https://issues.apache.org/jira/browse/HIVE-17022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16075167#comment-16075167
]
Naveen Gangam commented on HIVE-17022:
--------------------------------------
Thanks for the explanation. The fix in the patch looks good to me. Just a
couple of nits.
1) Think we should make the code above conditional, only when DEBUG is enabled.
So perhaps something like this
{code}
if (LOG.isDebugEnabled()) {
for (HiveLockObj obj : objs) {
LOG.debug("Acquiring lock for {} with mode {}", obj.getObj().getName(),
obj.getMode());
}
}
{code}
2) Is there a reason the above code is not in {{public List<HiveLock>
lock(List<HiveLockObj> objs, int numRetriesForLock, long sleepTime)}} method
but at a higher level? would it be better if we log these after the
{{sortLocks}} call so we print the sorted list?
Thanks
> Add mode in lock debug statements
> ---------------------------------
>
> Key: HIVE-17022
> URL: https://issues.apache.org/jira/browse/HIVE-17022
> Project: Hive
> Issue Type: Improvement
> Components: Locking
> Reporter: Mohit Sabharwal
> Assignee: Mohit Sabharwal
> Priority: Trivial
> Attachments: HIVE-17022.patch
>
>
> Currently, lock debug statements print IMPLICIT/EXPLICIT as lock mode,
> whereas SHARED/EXCLUSIVE/SEMI_SHARED are more useful
> when debugging.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)