hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Baranau <alex.barano...@gmail.com>
Subject Re: Undelete Rows
Date Wed, 19 Sep 2012 14:32:29 GMT
Interesting! Thanx for sharing.

I wonder if storing "minTs" as a delete marker (instead of deleting the
data) can help in your case. I.e. keep somewhere (in HBase/DB) the minTs
value for each part of deleted data and use it when reading data for the
user. When user deletes piece of data, you can set minTs for that piece to
be greater than any of that data (e.g. "current ts"). And when reading the
data tell Scanner to use it as minStamp of the data to return. Then you
will be able to decrease minTs to "undelete" the data.

Of course, this depends on your use-case, on how granular those pieces of
data which can be deleted. E.g. storing minTs for each record doesn't make
sense. While keeping it for larger pieces of data may work.

You probably thought about this approach though.

Alex Baranau
------
Sematext :: http://blog.sematext.com/ :: Hadoop - HBase - ElasticSearch -
Solr

On Wed, Sep 19, 2012 at 10:17 AM, Jerry Lam <chilinglam@gmail.com> wrote:

> Hi Alex:
>
> we have a functionality which allows users to delete the data stored in
> hbase but once in awhile, users can call us to undelete certain data that
> have been deleted a hour/day ago. Since we run major compaction weekly, my
> wishful thinking was that the data is still there and can be recovered if
> we can just delete the delete marker. It seems it is not as easy as I
> initially thought after reading the replies. Lars suggestion requires read
> the deleted data and write it back which can be expensive.
>
> Best Regards,
>
> Jerry
>
>
> On Wed, Sep 19, 2012 at 10:07 AM, Alex Baranau <alex.baranov.v@gmail.com
> >wrote:
>
> > Hi Jerry,
> >
> > Just out of the curiosity: what is your use-case? Why do you want to do
> > that? To gain extra protection from software error or smth else?
> >
> > Alex Baranau
> > ------
> > Sematext :: http://sematext.com/ :: Hadoop - HBase - ElasticSearch -
> Solr
> >
> > On Tue, Sep 18, 2012 at 6:32 PM, lars hofhansl <lhofhansl@yahoo.com>
> > wrote:
> >
> > > Can't do it (without low level massing HFiles, which you do not want to
> > > do).
> > > The best you can do (if you have HBASE-4536 and enabled
> > KEEP_DELETED_CELLS
> > > for you column family) is to read the deleted rows back and write them
> > > again with a newer TS.
> > >
> > > -- Lars
> > >
> > >
> > >
> > > ________________________________
> > >  From: Jerry Lam <chilinglam@gmail.com>
> > > To: user@hbase.apache.org
> > > Sent: Tuesday, September 18, 2012 3:06 PM
> > > Subject: Undelete Rows
> > >
> > > Hi HBase Community:
> > >
> > > I wonder if it is possible to undelete the rows that have been marked
> for
> > > deletion before the major compaction kicks in?
> > >
> > > I read about HBASE-4536 but I'm not sure if this can effectively remove
> > the
> > > tombstone marker?
> > >
> > > Any input is appreciated.
> > >
> > > Best Regards,
> > >
> > > Jerry
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message