hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enis Soztutar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12445) hbase is removing all remaining cells immediately after the cell marked with marker = KeyValue.Type.DeleteColumn via PUT
Date Thu, 13 Nov 2014 00:03:35 GMT

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

Enis Soztutar commented on HBASE-12445:
---------------------------------------

[~apurtell] sorry I did not notice that the new RC is not cut yet. Do you want to back this
out in 0.98.8 and re-add in 0.98.9, or keep it as it is. 

> hbase is removing all remaining cells immediately after the cell marked with marker =
KeyValue.Type.DeleteColumn via PUT
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-12445
>                 URL: https://issues.apache.org/jira/browse/HBASE-12445
>             Project: HBase
>          Issue Type: Bug
>            Reporter: sri
>            Assignee: Hani Nadra
>             Fix For: 2.0.0, 0.98.8, 0.99.2
>
>         Attachments: 0001-HBASE-11788-hbase-is-not-deleting-the-cell-when-a-Pu.patch,
12445-v2.patch, TestPutAfterDeleteColumn.java
>
>
> Code executed:
> {code}
>     @Test
>     public void testHbasePutDeleteCell() throws Exception {
>         TableName tableName = TableName.valueOf("my_test");
>         Configuration configuration = HBaseConfiguration.create();
>         HTableInterface table = new HTable(configuration, tableName);
>         final String rowKey = "12345";
>         final byte[] familly = Bytes.toBytes("default");
>         // put one row
>       Put put = new Put(rowKey);
>       put.add(family, Bytes.toBytes("A"), Bytes.toBytes("a"));
>       put.add(family, Bytes.toBytes("B"), Bytes.toBytes("b"));
>       put.add(family, Bytes.toBytes("C"), Bytes.toBytes("c"));
>       put.add(family, Bytes.toBytes("D"), Bytes.toBytes("d"));	  
>       table.put(put);
>       // get row back and assert the values
>       Get get = new Get(rowKey);
>       Result result = table.get(get);
>       assertTrue("Column A value should be a",
>         Bytes.toString(result.getValue(family, Bytes.toBytes("A"))).equals("a"));
>       assertTrue("Column B value should be b",
>         Bytes.toString(result.getValue(family, Bytes.toBytes("B"))).equals("b"));
>       assertTrue("Column C value should be c",
>         Bytes.toString(result.getValue(family, Bytes.toBytes("C"))).equals("c"));
>       assertTrue("Column D value should be d",
>         Bytes.toString(result.getValue(family, Bytes.toBytes("D"))).equals("d"));
>       // put the same row again with C column deleted
>       put = new Put(rowKey);
>       put.add(family, Bytes.toBytes("A"), Bytes.toBytes("a1"));
>       put.add(family, Bytes.toBytes("B"), Bytes.toBytes("b1"));
>       KeyValue marker = new KeyValue(rowKey, family, Bytes.toBytes("C"),
>         HConstants.LATEST_TIMESTAMP, KeyValue.Type.DeleteColumn); 
>       put.add(marker);
> 	  put.add(family, Bytes.toBytes("D"), Bytes.toBytes("d1"));
>       table.put(put);
>       // get row back and assert the values
>       get = new Get(rowKey);
>       result = table.get(get);
>       assertTrue("Column A value should be a1",
>         Bytes.toString(result.getValue(family, Bytes.toBytes("A"))).equals("a1"));
>       assertTrue("Column B value should be b1",
>         Bytes.toString(result.getValue(family, Bytes.toBytes("B"))).equals("b1"));
>       assertTrue("Column C should not exist",
>         result.getValue(family, Bytes.toBytes("C")) == null);
> 	  assertTrue("Column D value should be d1",
>         Bytes.toString(result.getValue(family, Bytes.toBytes("D"))).equals("d1"));
>     }
> {code}
> This assertion fails, the cell  D is also deleted



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message