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

Chia-Ping Tsai commented on HBASE-18142:
----------------------------------------

Breaking the operational compatibility, you need to fix the related unit tests. 
For example:
{code:title=table_test.rb}
    define_test "delete should work without timestamp" do
      @test_table.delete("101", "x:a")
      res = @test_table._get_internal('101', 'x:a')
      assert_nil(res)
    end

    define_test "delete should work with timestamp" do
      @test_table.delete("102", "x:a", 1214)
      res = @test_table._get_internal('102', 'x:a')
      assert_nil(res)
    end

    define_test "delete should work with integer keys" do
      @test_table.delete(103, "x:a")
      res = @test_table._get_internal('103', 'x:a')
      assert_nil(res)
    end
{code}

> Deletion of a cell deletes the previous versions too
> ----------------------------------------------------
>
>                 Key: HBASE-18142
>                 URL: https://issues.apache.org/jira/browse/HBASE-18142
>             Project: HBase
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 3.0.0
>            Reporter: Karthick
>            Assignee: ChunHao
>              Labels: beginner
>             Fix For: 3.0.0
>
>         Attachments: HBASE-18142.master.v0.patch, HBASE-18142.master.v1.patch
>
>
> When I tried to delete a cell using it's timestamp in the Hbase Shell, the 
> previous versions of the same cell also got deleted. But when I tried the 
> same using the Java API, then the previous versions are not deleted and I can 
> retrive the previous values.
> https://github.com/apache/hbase/blob/master/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Delete.java
> see this file to fix the issue. This method (public Delete addColumns(final 
> byte [] family, final byte [] qualifier, final long timestamp)) only deletes 
> the current version of the cell. The previous versions are not deleted.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to