hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amit Sela <am...@infolinks.com>
Subject Re: Can a RegionObserver coprocessor increment counter of a row key that may not belong to the region ?
Date Thu, 06 Dec 2012 08:05:59 GMT
If I'm aggregating over the same Increment Object that triggered the
Observer (the same key, same CFs but aggregating into different
qualifiers), do I go outside the Region ?
I know that for the cases I mentioned earlier I do but in the case I
describe here don't I stay in the region ?


On Thu, Dec 6, 2012 at 9:40 AM, Andrew Purtell <apurtell@apache.org> wrote:

> Summing/aggregating with a Coprocessor seems like a fine use, but it
> should act upon only the data within the region to which it is
> associated.
>
> However if it seems your Coprocessor must unavoidably update or access
> data outside of its region, then either your schema design should
> change (such that all data the coprocessor will operate on is
> contained within the keyspace of the region); or, you should exclude
> all possible client side options. For example maybe Datacube will work
> for you here? See http://github.com/urbanairship/datacube
>
> On 12/6/12, Amit Sela <amits@infolinks.com> wrote:
> > I asked because I thought exactly what you all said but wanted to be
> sure.
> > My case is incrementing counters per URL where the families are time
> > periods (hourly, daily...) and the qualifiers are
> > impressions_criteria1,impressions_criteria2... I am going to use
> > coprocessors in order to sum all impressions counters (all criteria
> > segments) and then increment another counter (general count) that belongs
> > to the same URL.
> > Is that a good practice for Coprocessors (Observer) ?
> >
> > Thanks.
> >
> >
> > On Wed, Dec 5, 2012 at 8:56 PM, Asaf Mesika <asaf.mesika@gmail.com>
> wrote:
> >
> >> Why not simply send Increment objects from the client side to HBase, to
> >> the URL row key and to the domain row key?
> >>
> >> On 5 בדצמ 2012, at 14:35, Amit Sela <amits@infolinks.com> wrote:
> >>
> >> > Hi all,
> >> >
> >> > I have to count the occurrence of URLs in our system using the URL as
> >> > row
> >> > key and using Increment.
> >> > I also want to count domains, so I was thinking of using
> RegionObserver
> >> > coprocessor on postIncrement() and Increment using the domain as key.
> >> >
> >> > Will that work ? Is there a problem if the url key starts with 'www.'
> >> > and
> >> > the domain starts with 'aaaa' ?
> >> >
> >> > Thanks,
> >> >
> >> > Amit.
> >>
> >>
> >
>

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