You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Anoop Sam John (JIRA)" <ji...@apache.org> on 2012/11/22 05:50:58 UTC

[jira] [Commented] (HBASE-7189) Adjacent column with timestamp=0 marked for deletion inadvertently

    [ https://issues.apache.org/jira/browse/HBASE-7189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502586#comment-13502586 ] 

Anoop Sam John commented on HBASE-7189:
---------------------------------------

I tested the same scenario with 0.94 version (which we are using) and the problem do not arise!
                
> Adjacent column with timestamp=0 marked for deletion inadvertently
> ------------------------------------------------------------------
>
>                 Key: HBASE-7189
>                 URL: https://issues.apache.org/jira/browse/HBASE-7189
>             Project: HBase
>          Issue Type: Bug
>          Components: Deletes
>    Affects Versions: 0.92.1
>         Environment: Ubuntu 10.04.2 LTS
> 2.6.32-28-server #55-Ubuntu SMP Mon Jan 10 23:57:16 UTC 2011 x86_64 GNU/Linux
> Cloudera distro 0.92.1-cdh4.1.2
>            Reporter: Chris Larsen
>            Priority: Minor
>              Labels: newbie
>
> This is an esoteric issue that I ran into. We're using binary arrays for column names and "compact" the columns from old rows into a single column to reduce storage usage. The column names are concatenated to create the new qualifier. On accident, I was setting the timestamp to 0 when storing the concatenated column. When I went to delete the old columns, the concatenated column with a timestamp of 0 was also deleted when it should not have been. 
> 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 test code for the delete 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);
> Setting a positive timestamp for the concatenated field solved my issue, but if someone else wants to use timestamps of 0, they may run into the same problem.
> NOTE: I also ran into the problem on hbase-0.90.4-cdh3u3

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira