This is an automated email from the ASF dual-hosted git repository.
pvary pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 980a45c HIVE-20797: Print Number of Locks Acquired (BELUGA BEHR via
Peter Vary)
980a45c is described below
commit 980a45c04aea7ba1cbff796504b0a99872cc1088
Author: BELUGA BEHR <[email protected]>
AuthorDate: Thu Feb 7 13:20:58 2019 +0100
HIVE-20797: Print Number of Locks Acquired (BELUGA BEHR via Peter Vary)
---
ql/src/java/org/apache/hadoop/hive/ql/Driver.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
index d622ce0..95a4653 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java
@@ -1680,6 +1680,9 @@ public class Driver implements IDriver {
/*It's imperative that {@code acquireLocks()} is called for all commands
so that
HiveTxnManager can transition its state machine correctly*/
queryTxnMgr.acquireLocks(plan, ctx, userFromUGI, lDrvState);
+ final List<HiveLock> locks = ctx.getHiveLocks();
+ LOG.info("Operation {} obtained {} locks", plan.getOperation(),
+ ((locks == null) ? 0 : locks.size()));
// This check is for controlling the correctness of the current state
if (queryTxnMgr.recordSnapshot(plan) && !validTxnListsGenerated) {
throw new IllegalStateException(