[
https://issues.apache.org/jira/browse/HIVE-17683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16491971#comment-16491971
]
Igor Kryvenko commented on HIVE-17683:
--------------------------------------
[~ekoifman] Hi. I investigated this issue. Seems we really need to annotate
only TableScan and FileSink operators, because only them generate write and
read entities. But problem is that we can't add lock information to them
because we acquire locks after setting explain work, and in the {{aquireLocks
method}} have query plan with explain work but not with origin plan, which has
no inputs and outputs, accordingly we can't add any lock information to
existing operators.
So, I see a couple of solution.
1. As you said in the comment above, just use {{show locks}} and add a result
to query plan.
2. Move {{acquireLocks}} method before analyzing query, as mentioned in
HIVE-18948
> Annotate Query Plan with locking information
> --------------------------------------------
>
> Key: HIVE-17683
> URL: https://issues.apache.org/jira/browse/HIVE-17683
> Project: Hive
> Issue Type: New Feature
> Components: Transactions
> Reporter: Eugene Koifman
> Assignee: Igor Kryvenko
> Priority: Critical
>
> Explore if it's possible to add info about what locks will be asked for to
> the query plan.
> Lock acquisition (for Acid Lock Manager) is done in
> DbTxnManager.acquireLocks() which is called once the query starts running.
> Would need to refactor that.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)