hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lars hofhansl <lhofha...@yahoo.com>
Subject Re: Problem to Insert the row that i was deleted
Date Wed, 25 Apr 2012 15:46:03 GMT
Thanks yonghu.

That is HBASE-4241.

One small point: The deleted rows are not deleted from the memstore, but rather not included
when the memstore is flushed to disk.

-- Lars

----- Original Message -----
From: yonghu <yongyong313@gmail.com>
To: user@hbase.apache.org; lars hofhansl <lhofhansl@yahoo.com>
Sent: Wednesday, April 25, 2012 1:10 AM
Subject: Re: Problem to Insert the row that i was deleted

As Lars mentioned, the row is not physically deleted. The way which
Hbase uses is to insert a cell called "tombstone" which is used to
mask the deleted value, but value is still there (if the deleted value
is in the same memstore with tombstone, it will be deleted in the
memstore, so you will not find tombstone and deleted value in the same
HFile.) This is new in hbase 0.92.0. In the previous 0.90.*, both
tombstone and deleted value are in HFile.  If you want to read your
deleted data, you can read the HFile which exists in server side which
is supported by 0.90.* version. If you just read the table content at
client side, I am afraid you have to first run the major compaction,
and then reinsert your deleted data.



On Wed, Apr 25, 2012 at 8:14 AM, lars hofhansl <lhofhansl@yahoo.com> wrote:
> Your only chance is to run a major compaction on your table - that will get rid of the
delete marker. Then you can re-add the Put with the same TS.
> -- Lars
> ps. Rereading my email below... At some point I will learn to proof-read my emails before
I send them full of grammatical errors.
> ----- Original Message -----
> From: Mahdi Negahi <negahi.mahdi@hotmail.com>
> To: Hbase <user@hbase.apache.org>
> Cc:
> Sent: Tuesday, April 24, 2012 10:46 PM
> Subject: RE: Problem to Insert the row that i was deleted
> thanks for ur sharing
> so there is no solution for return back the row ( or cells/columns) ?
>> Date: Tue, 24 Apr 2012 22:39:49 -0700
>> From: lhofhansl@yahoo.com
>> Subject: Re: Problem to Insert the row that i was deleted
>> To: user@hbase.apache.org
>> Rows (or rather cells/columns) are not actually deleted. Instead they are marked
for deletion by a delete marker. The deleted cells are collected during the next major or
minor comaction.
>> As long as the marker exist new Put (with thje same timestamp as the existing Put
will affected by the delete marker.
>> The delete marker itself will exist until the next major compaction.
>> This might seems strange, but is actually an important feature of HBase as it allows
operations to be executed in any order with the same end result.
>> -- Lars
>> ________________________________
>> From: Mahdi Negahi <negahi.mahdi@hotmail.com>
>> To: Hbase <user@hbase.apache.org>
>> Sent: Tuesday, April 24, 2012 9:05 PM
>> Subject: Problem to Insert the row that i was deleted
>> I delete a row and I want to add the same row ( with same Timestamp ) to HBase but
it is not added to the table. I know if I changed the timestamp it will added but it is necessary
to add it with the same timestamp.
>> please advice me where is my problem ?
>> regard
>> mahdi

View raw message