hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Marc Spaggiari (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-8678) Wrongly delete cells in some case which can not be deleted
Date Mon, 03 Jun 2013 21:32:21 GMT

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

Jean-Marc Spaggiari commented on HBASE-8678:

Ok. I drilled down into the code and found why it's acting that way.

If you want to make you example working fine, just modify it that way:
    Delete delete = new Delete(Bytes.toBytes("row21"));

Now, what do we want to do.

The REST server is expecting the URL to be key/column/ts/params. Here, we have not setup any
column... So URL was sent as row21/1 when it should have been row21/f1/1. 

We have 2 options.
1) Users will need to add the column in the delete call.
2) From the REST client we send the delete as row21//1 when there is no columns specified.

I tired 2 and it's working fine, but is it 100 compatible with all existing usecases? I don't

> Wrongly delete cells in some case which can not be deleted
> ----------------------------------------------------------
>                 Key: HBASE-8678
>                 URL: https://issues.apache.org/jira/browse/HBASE-8678
>             Project: HBase
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 0.94.5, 0.95.0
>         Environment: CentOS 5.5/hadoop0.20.2/hbase0.94.5/zookeeper3.4.3
>            Reporter: Eric Huang
> First, I put a cell using put interface, but I don't specify timestamp. Then I delete
the the same row, specify a timestamp of 1L. Unfortunately, the former cell is 
> deleted. We should know this cell can not be deleted in this case. (Using original Client
> Code like this;
> public static void main(String[] args) throws Exception {
>         Cluster cluster = new Cluster();
>         cluster.add("", 8080);
>         Client client = new Client(cluster);
>         RemoteHTable table = new RemoteHTable(client, "demotime");
>         Put put = new Put(Bytes.toBytes("row21"));
>         put.add("info".getBytes(), "name".getBytes(), "huanggang".getBytes());
>         table.put(put);
>         Delete delete = new Delete(Bytes.toBytes("row21"));
>         delete.setTimestamp(1L);
>         table.delete(delete);
>     }

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

View raw message