You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Guillermo Ortiz <ko...@gmail.com> on 2014/07/21 14:24:47 UTC

Coprocessor beacuse of TTL expired?

I want to use coprocessors (observers), Could I execute an coprocessors
which executes my code when a row expired because the TTL has expired?

will it be executed automatically? I mean,, without any scan or get over
that row?? it's a pre and post delete or which observer?

Re: Coprocessor beacuse of TTL expired?

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
If I'm not mistaken you can do that with HBASE-11054.

JM


2014-07-21 8:24 GMT-04:00 Guillermo Ortiz <ko...@gmail.com>:

> I want to use coprocessors (observers), Could I execute an coprocessors
> which executes my code when a row expired because the TTL has expired?
>
> will it be executed automatically? I mean,, without any scan or get over
> that row?? it's a pre and post delete or which observer?
>

Re: Coprocessor beacuse of TTL expired?

Posted by ramkrishna vasudevan <ra...@gmail.com>.
We handled one such requirement by creating a custom scanner by using the
compaction hooks as Lars suggested.
On Jul 21, 2014 7:57 PM, "lars hofhansl" <la...@apache.org> wrote:

> HBASE-11054 is about delete trackers (i.e. when/how delete markers are
> enforced), TTL is handled differently. One could ask why these are handled
> differently of course.
>
>
>
> ________________________________
>  From: Jean-Marc Spaggiari <je...@spaggiari.org>
> To: user <us...@hbase.apache.org>; lars hofhansl <la...@apache.org>
> Sent:
> Subject: Re: Coprocessor beacuse of TTL expired?
>
>
> I had open 10115 a while back but I think  11054 mostly covers it. But this
> was exactly the idea behind 10115.
>
>
>
>
>
> 2014-07-21 10:19 GMT-04:00 lars hofhansl <la...@apache.org>:
>
> > It's possible but ... uhm... Tedious. You would have to use the pre flush
> > and compaction scanner open hooks, do the TTL calculation yourself for
> each
> > KeyValue that passes through the scanner and then act accordingly.
> >
> > Checkout RegionObserver.preCompactScannerOpen(...) and
> > preFlushScannerOpen(...)
> >
> > It's possible we could add something like this.
> >
> > -- Lars
> >
> >
> >
> > ________________________________
> >  From: Guillermo Ortiz <ko...@gmail.com>
> > To: "user@hbase.apache.org" <us...@hbase.apache.org>
> > Sent: Monday, July 21, 2014 5:24 AM
> > Subject: Coprocessor beacuse of TTL expired?
> >
> >
> > I want to use coprocessors (observers), Could I execute an coprocessors
> > which executes my code when a row expired because the TTL has expired?
> >
> > will it be executed automatically? I mean,, without any scan or get over
> > that row?? it's a pre and post delete or which observer?
> >

Re: Coprocessor beacuse of TTL expired?

Posted by lars hofhansl <la...@apache.org>.
HBASE-11054 is about delete trackers (i.e. when/how delete markers are enforced), TTL is handled differently. One could ask why these are handled differently of course.



________________________________
 From: Jean-Marc Spaggiari <je...@spaggiari.org>
To: user <us...@hbase.apache.org>; lars hofhansl <la...@apache.org> 
Sent: 
Subject: Re: Coprocessor beacuse of TTL expired?
 

I had open 10115 a while back but I think  11054 mostly covers it. But this
was exactly the idea behind 10115.





2014-07-21 10:19 GMT-04:00 lars hofhansl <la...@apache.org>:

> It's possible but ... uhm... Tedious. You would have to use the pre flush
> and compaction scanner open hooks, do the TTL calculation yourself for each
> KeyValue that passes through the scanner and then act accordingly.
>
> Checkout RegionObserver.preCompactScannerOpen(...) and
> preFlushScannerOpen(...)
>
> It's possible we could add something like this.
>
> -- Lars
>
>
>
> ________________________________
>  From: Guillermo Ortiz <ko...@gmail.com>
> To: "user@hbase.apache.org" <us...@hbase.apache.org>
> Sent: Monday, July 21, 2014 5:24 AM
> Subject: Coprocessor beacuse of TTL expired?
>
>
> I want to use coprocessors (observers), Could I execute an coprocessors
> which executes my code when a row expired because the TTL has expired?
>
> will it be executed automatically? I mean,, without any scan or get over
> that row?? it's a pre and post delete or which observer?
>

Re: Coprocessor beacuse of TTL expired?

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
I had open 10115 a while back but I think  11054 mostly covers it. But this
was exactly the idea behind 10115.


2014-07-21 10:19 GMT-04:00 lars hofhansl <la...@apache.org>:

> It's possible but ... uhm... Tedious. You would have to use the pre flush
> and compaction scanner open hooks, do the TTL calculation yourself for each
> KeyValue that passes through the scanner and then act accordingly.
>
> Checkout RegionObserver.preCompactScannerOpen(...) and
> preFlushScannerOpen(...)
>
> It's possible we could add something like this.
>
> -- Lars
>
>
>
> ________________________________
>  From: Guillermo Ortiz <ko...@gmail.com>
> To: "user@hbase.apache.org" <us...@hbase.apache.org>
> Sent: Monday, July 21, 2014 5:24 AM
> Subject: Coprocessor beacuse of TTL expired?
>
>
> I want to use coprocessors (observers), Could I execute an coprocessors
> which executes my code when a row expired because the TTL has expired?
>
> will it be executed automatically? I mean,, without any scan or get over
> that row?? it's a pre and post delete or which observer?
>

Re: Coprocessor beacuse of TTL expired?

Posted by lars hofhansl <la...@apache.org>.
It's possible but ... uhm... Tedious. You would have to use the pre flush and compaction scanner open hooks, do the TTL calculation yourself for each KeyValue that passes through the scanner and then act accordingly.

Checkout RegionObserver.preCompactScannerOpen(...) and preFlushScannerOpen(...)

It's possible we could add something like this.

-- Lars



________________________________
 From: Guillermo Ortiz <ko...@gmail.com>
To: "user@hbase.apache.org" <us...@hbase.apache.org> 
Sent: Monday, July 21, 2014 5:24 AM
Subject: Coprocessor beacuse of TTL expired?
 

I want to use coprocessors (observers), Could I execute an coprocessors
which executes my code when a row expired because the TTL has expired?

will it be executed automatically? I mean,, without any scan or get over
that row?? it's a pre and post delete or which observer?