[ https://issues.apache.org/jira/browse/HIVE-17683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16490856#comment-16490856 ]
Eugene Koifman commented on HIVE-17683: --------------------------------------- Great. Here are a some pointers that may be useful: Once {{rqstBuilder.build()}} is done at the end of {{DbTxnManager.acquireLocks}} but before it is passed {{lockMgr}}, you know everything about the locks that will be asked for, but haven't yet asked for them. Then if you walk the QueryPlan to find all TableScan and FileSink, you should be able to annotate their Desc object with lock info so that it shows up in EXPLAIN output. {{QueryPlanPostProcessor}} may be useful - it's an example of how to walk physical plan to find \{{FileSinkDesc}} > 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)