Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C9FB112F4 for ; Tue, 22 Jul 2014 19:21:55 +0000 (UTC) Received: (qmail 21740 invoked by uid 500); 22 Jul 2014 19:21:55 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 21664 invoked by uid 500); 22 Jul 2014 19:21:55 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 21636 invoked by uid 99); 22 Jul 2014 19:21:54 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2014 19:21:54 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id EEF301DB963; Tue, 22 Jul 2014 19:21:41 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3161572043638499879==" MIME-Version: 1.0 Subject: Review Request 23820: HIVE-7445:Improve LOGS for Hive when a query is not able to acquire locks From: "Chaoyu Tang" To: "Szehon Ho" , "Xuefu Zhang" , "Prasad Mujumdar" , "Brock Noland" Cc: "hive" , "Chaoyu Tang" Date: Tue, 22 Jul 2014 19:21:41 -0000 Message-ID: <20140722192141.4203.77534@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Chaoyu Tang" X-ReviewGroup: hive X-ReviewRequest-URL: https://reviews.apache.org/r/23820/ X-Sender: "Chaoyu Tang" Reply-To: "Chaoyu Tang" X-ReviewRequest-Repository: hive-git --===============3161572043638499879== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/23820/ ----------------------------------------------------------- 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 --===============3161572043638499879==--