You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Matthias Lehmann (JIRA)" <ji...@apache.org> on 2010/03/01 10:57:05 UTC

[jira] Commented: (HBASE-2272) put with timestamp after delete is not stored

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

Matthias Lehmann commented on HBASE-2272:
-----------------------------------------

I made a terribly stupid mistake: I was used to think of timestamps of seconds since epoch time (python uses floats to express milliseconds) but HBase uses Longs of millisenconds since epoch time. So obviously, my explicit timestamps lay way back in the past, which is why the put with timestamp was shadowed by the delete.

Sorry that I took so much of you time - larsgeorge and jdcryans.


> put with timestamp after delete is not stored
> ---------------------------------------------
>
>                 Key: HBASE-2272
>                 URL: https://issues.apache.org/jira/browse/HBASE-2272
>             Project: Hadoop HBase
>          Issue Type: Bug
>    Affects Versions: 0.20.3
>            Reporter: Matthias Lehmann
>
> When I delete a row and afterwards put a value for that row again, I can not get it (so apparently it was not stored), but only, when I put the value with a timestamp.
> A flush of the table between delete and put bypasses the problem.
> I give a hbase-shell log as an example.
> Lets assume, we have a table 'foo' with a column-familiy 's:':
> The Error
> >put 'foo', '123', 's:bar', 'hello'
> >get 'foo', '123'
> COLUMN                       CELL
>  s:bar                       timestamp=..., value=hello
> >deleteall 'foo', '123'
> // put WITH timestamp
> >put 'foo', '123', 's:bar', 'hello', 1267202287
> > get 'foo', '123'
> COLUMN                       CELL
> // nothing, even though a value was saved before
> But This Works
> >put 'foo', '123', 's:bar', 'hello'
> >get 'foo', '123'
> COLUMN                       CELL
>  s:bar                       timestamp=..., value=hello
> >deleteall 'foo', '123'
> // put WITHOUT timestamp
> >put 'foo', '123', 's:bar', 'hello'
> > get 'foo', '123'
> COLUMN                       CELL
>  s:bar                       timestamp=..., value=hello
> // value was saved
> And Also
> >put 'foo', '123', 's:bar', 'hello'
> >get 'foo', '123'
> COLUMN                       CELL
>  s:bar                       timestamp=..., value=hello
> >deleteall 'foo', '123'
> // flush table
> >flush 'foo'
> // put WITH timestamp
> >put 'foo', '123', 's:bar', 'hello', 1267202287
> > get 'foo', '123'
> COLUMN                       CELL
>  s:bar                       timestamp=..., value=hello
> // value was saved
> The error also occurs with single cells - one does not have to delete whole rows:
> >put 'foo', '123', 's:bar', 'hello'
> >put 'foo', '123', 's:baz', 'world'
> >get 'foo', '123'
> COLUMN                       CELL
>  s:bar                       timestamp=..., value=hello
>  s:baz                       timestamp=..., value=world
> >delete 'foo', '123', 's:bar'
> // put WITH timestamp
> >put 'foo', '123', 's:bar', 'hello', 1267202287
> >get 'foo', '123'
> COLUMN                       CELL
>  s:baz                       timestamp=..., value=world
> // value for s:baz was not saved

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.