Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 398EF200BA5 for ; Wed, 19 Oct 2016 13:50:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 36A23160AEA; Wed, 19 Oct 2016 11:50:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7CC2D160ADE for ; Wed, 19 Oct 2016 13:50:49 +0200 (CEST) Received: (qmail 93991 invoked by uid 500); 19 Oct 2016 11:50:48 -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 93963 invoked by uid 99); 19 Oct 2016 11:50:48 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Oct 2016 11:50:48 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id D36332D9C4A; Wed, 19 Oct 2016 11:50:46 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1245218769760915345==" MIME-Version: 1.0 Subject: Re: Review Request 52923: HIVE-14979 Removing stale Zookeeper locks at HiveServer2 initialization From: Peter Vary To: Barna Zsombor Klara , Ashutosh Chauhan , Marta Kuczora , Miklos Csanady , namit jain , Sergio Pena Cc: Peter Vary , hive , Lefty Leverenz Date: Wed, 19 Oct 2016 11:50:46 -0000 Message-ID: <20161019115046.5284.98955@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Peter Vary X-ReviewGroup: hive X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/52923/ X-Sender: Peter Vary References: <20161018092329.14471.49675@reviews.apache.org> In-Reply-To: <20161018092329.14471.49675@reviews.apache.org> Reply-To: Peter Vary X-ReviewRequest-Repository: hive-git archived-at: Wed, 19 Oct 2016 11:50:50 -0000 --===============1245218769760915345== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52923/ ----------------------------------------------------------- (Updated Oct. 19, 2016, 11:50 a.m.) Review request for hive, Ashutosh Chauhan, Marta Kuczora, Miklos Csanady, namit jain, Sergio Pena, and Barna Zsombor Klara. Changes ------- Addressed Lefty's comments Bugs: HIVE-14979 https://issues.apache.org/jira/browse/HIVE-14979 Repository: hive-git Description ------- Adding a new configuration option to HiveConf to signal whether stale lock removal is requested on startup. Adding a new method to ZooKeeperHiveLockManager to remove stale locks Modifying the HiveServer2 to instantiate a lock manager and call the new method if defined by the configuration. Please take extra care when reviewing these: - Modifying the lock fetching method to use the clientIp from the lock, and not update with the current ip - Not sure why it was done before - Instantiation of the lock manager - I might not chose the best method for it Open for any suggestions :) Thanks, Peter Diffs (updated) ----- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 8ffae3b ql/src/java/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ZooKeeperHiveLockManager.java 14d0ef4 ql/src/test/org/apache/hadoop/hive/ql/lockmgr/zookeeper/TestZookeeperLockManager.java 3f9926e service/src/java/org/apache/hive/service/server/HiveServer2.java 590b1f3 Diff: https://reviews.apache.org/r/52923/diff/ Testing ------- Created 2 unit test cases: - Removing own locks - Not removing other server's locks Manually tested the Lock manager instantiation method on HiveServer2 Thanks, Peter Vary --===============1245218769760915345==--