Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Problem to Insert the row that i was deleted


Copy link to this message
-
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.

Reagards!

Yong

On Wed, Apr 25, 2012 at 8:14 AM, lars hofhansl <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
> To: Hbase <[EMAIL PROTECTED]>
> 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: [EMAIL PROTECTED]
>> Subject: Re: Problem to Insert the row that i was deleted
>> To: [EMAIL PROTECTED]
>>
>> 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 <[EMAIL PROTECTED]>
>> To: Hbase <[EMAIL PROTECTED]>
>> 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