Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CAFDA10347 for ; Mon, 24 Nov 2014 22:32:37 +0000 (UTC) Received: (qmail 35670 invoked by uid 500); 24 Nov 2014 22:32:36 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 35600 invoked by uid 500); 24 Nov 2014 22:32:36 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 35588 invoked by uid 99); 24 Nov 2014 22:32:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Nov 2014 22:32:35 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yuzhihong@gmail.com designates 209.85.220.46 as permitted sender) Received: from [209.85.220.46] (HELO mail-pa0-f46.google.com) (209.85.220.46) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Nov 2014 22:32:08 +0000 Received: by mail-pa0-f46.google.com with SMTP id lj1so10344405pab.19 for ; Mon, 24 Nov 2014 14:32:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=nfb67g9PCY6HRZkJJ78pE4doU3+zsl36igVMBkeQVac=; b=lzLyg9DyCvxgSK7qMIyN/puXqL/9qRgKvpmcMSJMV8kRjTqEzyMLSPU+UwBF1P4kQW U4QcMma9rfw0d/wsyPPk9iKINlzimQGUA/7L6fm+H6e//WgPD7Vx12bhS3VnDn283dhv estFo0H4wHfzN5QAbkIOzrYNSa+nVZskIOV6lJPCImmfB38xd/CKMduWYTEf3hH2ZQEA x5w785BYSWPfyLf3I6MHjL4QOn5jrPzbjGLBsFNTVnRjqdka+LQY8dLx+t97XTZx8ODC zebwDkdaYxDSwB2CUaISEdzlW75BlsXcxeNfrmIH9W9WbXUWtX3R8tUfEXLdP+DqGpqH yPmw== X-Received: by 10.70.89.207 with SMTP id bq15mr4809285pdb.68.1416868326509; Mon, 24 Nov 2014 14:32:06 -0800 (PST) Received: from [100.100.221.123] (197.sub-70-211-140.myvzw.com. [70.211.140.197]) by mx.google.com with ESMTPSA id v4sm13327727pbs.10.2014.11.24.14.32.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Nov 2014 14:32:05 -0800 (PST) References: <1416861109695-4066298.post@n3.nabble.com> Mime-Version: 1.0 (1.0) In-Reply-To: <1416861109695-4066298.post@n3.nabble.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <66469C3A-F609-4DAD-93CD-4D25E3058319@gmail.com> Cc: "user@hbase.apache.org" X-Mailer: iPhone Mail (10B146) From: Ted Yu Subject: Re: PreBatchMutate - Delete another row inside this method Date: Mon, 24 Nov 2014 14:32:04 -0800 To: "user@hbase.apache.org" X-Virus-Checked: Checked by ClamAV on apache.org Row '123' may be in a different region from the one row '111' is in.=20 Cross region RPC should be avoided in coprocessor.=20 Does your application require that the deletion of row '123' be in the same t= ransaction as the mutation ? Cheers On Nov 24, 2014, at 12:31 PM, tvraju wrote: > Hi, > IN PreBatchMutate method in Observer, I am trying to check whether a row ,= > say '123', exists and delete the row. This row is different from the > current row , say '111' ,in the method, which has locked the current row. > But Delete operation is waiting for the lock to '111' instead of '123'. >=20 > Say, I have a table - test_delete, cf:delete_row > I have two rows 1) '123','defaultRow' 2) '111','111' >=20 > I will try to re-insert the second row with '111','123'. IN PreBatchMutate= > method, I am trying to check if row '123' exists and delete it. >=20 > Result result =3D c.getEnvironment().getRegion().get(new > Get(Bytes.toBytes('123'))); > byte[] deleteRow =3D result.getRow(); > logger.debug(String.format("Deleting row > :%s", Bytes.toString(deleteRow))); > Delete delete =3D new Delete(deleteRow); >=20 > c.getEnvironment().getRegion().delete(delete); >=20 > Exception : >=20 > org.apache.hadoop.hbase.regionserver.HRegion: Failed getting lock in batch= > put, row=3D111 > java.io.IOException: Timed out waiting for lock for row: 111 >=20 > Please advice. >=20 >=20 >=20 >=20 >=20 > -- > View this message in context: http://apache-hbase.679495.n3.nabble.com/Pre= BatchMutate-Delete-another-row-inside-this-method-tp4066298.html > Sent from the HBase User mailing list archive at Nabble.com.