----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/23820/#review48441 -----------------------------------------------------------
Hey Chaoyu thanks, the logic looks good now. Can you also fix all the red-space? It's two lines per indent in hive, thanks. ql/src/java/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ZooKeeperHiveLockManager.java <https://reviews.apache.org/r/23820/#comment85045> Why was this necessary to change? - Szehon Ho On July 22, 2014, 7:21 p.m., Chaoyu Tang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/23820/ > ----------------------------------------------------------- > > (Updated July 22, 2014, 7:21 p.m.) > > > Review request for hive, Brock Noland, Prasad Mujumdar, Szehon Ho, and Xuefu > Zhang. > > > Bugs: HIVE-7445 > https://issues.apache.org/jira/browse/HIVE-7445 > > > Repository: hive-git > > > Description > ------- > > This patch enables ZookeeperHiveLockManager.java, when in debug mode, to log > out information about contentious locks if lockmgr fails to acquire a lock > for a query. The changes include: > 1. Collect and log out contentious lock information in > ZookeeperHiveLockManager.java > 2. Improve lock retry counting and existing logging, and modified some qtests > output files to match these logging > > > > Diffs > ----- > > ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveLockObject.java 1cc3074 > > ql/src/java/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ZooKeeperHiveLockManager.java > 65b9136 > ql/src/test/results/clientnegative/insert_into1.q.out a38b679 > ql/src/test/results/clientnegative/insert_into2.q.out f21823a > ql/src/test/results/clientnegative/insert_into3.q.out 5f1581e > ql/src/test/results/clientnegative/insert_into4.q.out 5dcdd50 > ql/src/test/results/clientnegative/lockneg1.q.out 6a76cd7 > ql/src/test/results/clientnegative/lockneg_try_db_lock_conflict.q.out > a9833a8 > ql/src/test/results/clientnegative/lockneg_try_drop_locked_db.q.out d67365a > ql/src/test/results/clientnegative/lockneg_try_lock_db_in_use.q.out 89d3265 > > Diff: https://reviews.apache.org/r/23820/diff/ > > > Testing > ------- > > 1. Manual tests: following debug logging was printed out as expected during a > lock acquisition failure. > --- > Unable to acquire IMPLICIT, EXCLUSIVE lock default@sample_07 after 2 attempts. > 14/07/22 11:44:40 ERROR ZooKeeperHiveLockManager: Unable to acquire IMPLICIT, > EXCLUSIVE lock default@sample_07 after 2 attempts. > 14/07/22 11:44:40 DEBUG ZooKeeperHiveLockManager: Requested lock > default@sample_07:: mode:IMPLICIT,EXCLUSIVE; query:insert into table > sample_07 select * from sample_08 > 14/07/22 11:44:40 DEBUG ZooKeeperHiveLockManager: Conflicting lock to > default@sample_07:: mode:IMPLICIT;query:select code from > sample_07;queryId:root_20140722084242_98f8d9d7-d110-45c0-8c8b-12da2e5172d9;clientIp:10.20.92.233 > --- > > 2. Precommit tests > The test failure testCliDriver_ql_rewrite_gbtoidx is a preexisting one and I > think it is not related to this change. > > > Thanks, > > Chaoyu Tang > >