[
https://issues.apache.org/jira/browse/HBASE-18142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16167919#comment-16167919
]
Chia-Ping Tsai commented on HBASE-18142:
----------------------------------------
{code}
- @test_table.put("101", "x:a", "1")
- @test_table.put("101", "x:a", "2", Time.now.to_i)
-
- @test_table.put("102", "x:a", "1", 1212)
- @test_table.put("102", "x:a", "2", 1213)
-
- @test_table.put(103, "x:a", "3")
- @test_table.put(103, "x:a", "4")
-
+ @test_table.put("102", "x:a", "2", 1212)
+ @test_table.put(103, "x:a", "3", 1214)
+
@test_table.put("104", "x:a", 5)
@test_table.put("104", "x:b", 6)
-
+
@test_table.put(105, "x:a", "3")
@test_table.put(105, "x:a", "4")
{code}
Because of the bending time issue, you have to change the initial data in order
to run the test of deleting specified version. +1
> 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, shell
> Affects Versions: 3.0.0, 1.3.1, 1.2.6, 2.0.0-alpha-1
> Reporter: Karthick
> Assignee: ChunHao
> Labels: beginner
> Fix For: 2.0.0, 1.4.0, 1.3.2, 1.5.0, 1.2.7
>
> Attachments: HBASE-18142.master.v0.patch,
> HBASE-18142.master.v1.patch, HBASE-18142.master.v2.patch,
> HBASE-18142.master.v3.patch, HBASE-18142.master.v4.patch,
> HBASE-18142.master.v5.patch, HBASE-18142.master.v6.patch,
> HBASE-18142.master.v7.patch, HBASE-18142.master.v8.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 addColumn(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)