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 D30E1D536 for ; Mon, 19 Nov 2012 07:45:40 +0000 (UTC) Received: (qmail 6532 invoked by uid 500); 19 Nov 2012 07:45:38 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 6471 invoked by uid 500); 19 Nov 2012 07:45:37 -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 6425 invoked by uid 99); 19 Nov 2012 07:45:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2012 07:45:36 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of anilgupta84@gmail.com designates 209.85.210.169 as permitted sender) Received: from [209.85.210.169] (HELO mail-ia0-f169.google.com) (209.85.210.169) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2012 07:45:29 +0000 Received: by mail-ia0-f169.google.com with SMTP id r4so3980985iaj.14 for ; Sun, 18 Nov 2012 23:45:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=lr4zdTWwik3jNjPAI16xlbaFX/VWlvTtEWNXEj02FVk=; b=y4Gq/WbADhlvoZ4ne0jJ0Tf5u8ua/1XD7ODKtSxx3LHhXf2cYTzpi81eUGtcBJSxWv FNoXgmGOZkT4PR9mblp6gb4VVrRvWh+5UyLazTqdwvKrZBR5OkrtFW6KthKa9MY0XZZp zt97QI0Sn2DUuwc8P76WwHdad7nQTGeI7VUybjxNBYBSLw88bYnCjd8dx7VygtrNyles gTJcC2eNbXWZQFDgSrR0+LhyFfWMwqLz4/oK4yYvHWex+pvZLeXK2BhaqOWyOVk2J+nn fotScuOOGR7wngSPt8IBMXSbbmVxxFM7O4C1uJDD+0TsZ+ZQK91BvePr3A80fugdODfN eYTg== Received: by 10.50.152.231 with SMTP id vb7mr5981354igb.1.1353311109098; Sun, 18 Nov 2012 23:45:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.67.197 with HTTP; Sun, 18 Nov 2012 23:44:48 -0800 (PST) In-Reply-To: <00ec01cdc619$13a8e410$3afaac30$@euphoriaaudio.com> References: <005e01cdc5c9$4df89ed0$e9e9dc70$@euphoriaaudio.com> <00ec01cdc619$13a8e410$3afaac30$@euphoriaaudio.com> From: anil gupta Date: Sun, 18 Nov 2012 23:44:48 -0800 Message-ID: Subject: Re: Problem deleting neighboors with timestamp=0 To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=e89a8f3b9e95edacdf04ced44b97 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f3b9e95edacdf04ced44b97 Content-Type: text/plain; charset=ISO-8859-1 Hi Chris, My two cents... IMHO, onus of ensuring the right Timestamp value should always be on the application logic rather than HBase. Essentially, timestamp is long number in HBase. So, Timestamp with value of '0' seems to be a valid value. What if someone really wants to use the value 0 as timestamp? HBase is used by a variety of users in quite different use cases. So, i dont think it would be a good idea of introducing this restriction. HTH, Anil On Sun, Nov 18, 2012 at 9:45 PM, Chris Larsen wrote: > > So you mean that you have explicitly set the timestamp to 0 for the > column > which you did not want to delete? > > Yes, my code was setting the timestamp explicitly to 0. I fixed that bug in > my code (since I do want a valid timestamp) but I was wondering if a > timestamp of 0 is "legal" and if it isn't, maybe HBase should kick back > errors if someone tries it. > > -----Original Message----- > From: ramkrishna vasudevan [mailto:ramkrishna.s.vasudevan@gmail.com] > Sent: Sunday, November 18, 2012 11:31 PM > To: user@hbase.apache.org > Subject: Re: Problem deleting neighboors with timestamp=0 > > Hi Chris > > So you mean that you have explicitly set the timestamp to 0 for the column > which you did not want to delete? > > Regards > Ram > > On Mon, Nov 19, 2012 at 1:44 AM, Chris Larsen > wrote: > > > Hello, I was going nuts over an issue where I would try to delete a > > single column but a neighboring column (sorted by the column names in > > bytes) was also being deleted because, I found out, the timestamp for > > the neighbor was set to 0. Here are some of the columns in the row > > (taken from the shell > > utility) > > > > > > > > hbase(main):002:0> get 'mytable', > > "\x00\x01\xAA\x50\x8E\xC4\x20\x00\x00\x01\x00\x00\xAC" > > > > COLUMN CELL > > > > t:\x00\x17 timestamp=1351533601998, > > value=\x00\x00\x00\x00O\xB2\xDC[ > > > > t:\x00\x17\x03\xD7\x...(long name) timestamp=0, value=\x00\x00\x... > > lots > > of binary data.... > > > > t:\x03\xD7 timestamp=1351533661458, > > value=\x00\x00\x00\x00O\xB9\xD1\xE5 > > > > t:\x07\x97 timestamp=1351533721758, > > value=\x00\x00\x00\x00O\xBC#\xD0 > > > > t:\x0BW timestamp=1351533781738, > > value=\x00\x00\x00\x00O\xBD\xB93 > > > > > > > > I wanted to delete the column "t:\x00\x17" but every time I did, the > > column "t:\x00\x17\x03\xD7\x..." would also be deleted so that I'd wind > up > with: > > > > > > > > hbase(main):005:0> get 'mytable', > > "\x00\x01\xAA\x50\x8E\xC4\x20\x00\x00\x01\x00\x00\xAC" > > > > COLUMN CELL > > > > t:\x03\xD7 timestamp=1351533661458, > > value=\x00\x00\x00\x00O\xB9\xD1\xE5 > > > > t:\x07\x97 timestamp=1351533721758, > > value=\x00\x00\x00\x00O\xBC#\xD0 > > > > t:\x0BW timestamp=1351533781738, > > value=\x00\x00\x00\x00O\xBD\xB93 > > > > > > > > My JAVA code looked like this: > > > > > > > > HTableInterface table = factory.createHTableInterface(config, > > "mytable".getBytes()); > > > > Delete delete = new Delete(HexToBytes("0001AA508EC4200000010000AC")); > > > > delete.deleteColumn("t".getBytes(), new byte[] { (byte) 0x00, (byte) > > 0x17 }); > > > > table.delete(delete); > > > > > > > > as I was typing this out, I noticed that the column I didn't want to > > delete had a timestamp of 0. I put the column back with a valid > > timestamp and tried deleting the original column, and it worked > > properly. I fixed my code to always provide a positive timestamp, but > > my question is, are timestamps set to 0 valid for storing data in > > HBase? And if so, then this may be a bug that needs addressing. > > Thanks! > > > > > > -- Thanks & Regards, Anil Gupta --e89a8f3b9e95edacdf04ced44b97--