|
Amit Sela
2012-12-05, 12:35
Ted Yu
2012-12-05, 17:06
Amit Sela
2012-12-05, 17:30
Anoop John
2012-12-05, 17:58
Asaf Mesika
2012-12-05, 18:56
Amit Sela
2012-12-06, 07:28
Andrew Purtell
2012-12-06, 07:40
Amit Sela
2012-12-06, 08:05
Andrew Purtell
2012-12-06, 09:13
Amit Sela
2012-12-06, 13:42
Toby Lazar
2012-12-06, 16:25
Andrew Purtell
2012-12-07, 07:57
Asaf Mesika
2012-12-07, 08:15
|
-
Can a RegionObserver coprocessor increment counter of a row key that may not belong to the region ?Amit Sela 2012-12-05, 12:35
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.
-
Re: Can a RegionObserver coprocessor increment counter of a row key that may not belong to the region ?Ted Yu 2012-12-05, 17:06
Are rows with domain as key stored in the same table ?
Normally this is not desirable since the domain count would go to (potentially) another region server. Cheers On Wed, Dec 5, 2012 at 4:35 AM, Amit Sela <[EMAIL PROTECTED]> 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. >
-
Re: Can a RegionObserver coprocessor increment counter of a row key that may not belong to the region ?Amit Sela 2012-12-05, 17:30
And if they are not in the same table ?
On Dec 5, 2012 7:06 PM, "Ted Yu" <[EMAIL PROTECTED]> wrote: > Are rows with domain as key stored in the same table ? > > Normally this is not desirable since the domain count would go to > (potentially) another region server. > > Cheers > > On Wed, Dec 5, 2012 at 4:35 AM, Amit Sela <[EMAIL PROTECTED]> 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. > > >
-
Re: Can a RegionObserver coprocessor increment counter of a row key that may not belong to the region ?Anoop John 2012-12-05, 17:58
In that case the CP hook might need to make an RPC call.. Might be to
another RS? In this case why cant you think of doing both the table updation from the client side? Sorry I am not fully sure abt your use case -Anoop- On Wed, Dec 5, 2012 at 11:00 PM, Amit Sela <[EMAIL PROTECTED]> wrote: > And if they are not in the same table ? > On Dec 5, 2012 7:06 PM, "Ted Yu" <[EMAIL PROTECTED]> wrote: > > > Are rows with domain as key stored in the same table ? > > > > Normally this is not desirable since the domain count would go to > > (potentially) another region server. > > > > Cheers > > > > On Wed, Dec 5, 2012 at 4:35 AM, Amit Sela <[EMAIL PROTECTED]> 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. > > > > > >
-
Re: Can a RegionObserver coprocessor increment counter of a row key that may not belong to the region ?Asaf Mesika 2012-12-05, 18:56
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 <[EMAIL PROTECTED]> 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.
-
Re: Can a RegionObserver coprocessor increment counter of a row key that may not belong to the region ?Amit Sela 2012-12-06, 07:28
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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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. > >
-
Re: Can a RegionObserver coprocessor increment counter of a row key that may not belong to the region ?Andrew Purtell 2012-12-06, 07:40
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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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. >> >> >
-
Re: Can a RegionObserver coprocessor increment counter of a row key that may not belong to the region ?Amit Sela 2012-12-06, 08:05
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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> > 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 <[EMAIL PROTECTED]> 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. > >> > >> > > >
-
Re: Can a RegionObserver coprocessor increment counter of a row key that may not belong to the region ?Andrew Purtell 2012-12-06, 09:13
If you as a coprocessor are not writing back to your own region, you are
probably doing it wrong. On Thursday, December 6, 2012, Amit Sela wrote: > 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 <[EMAIL PROTECTED]<javascript:;>> > 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 <[EMAIL PROTECTED] <javascript:;>> 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 <[EMAIL PROTECTED]<javascript:;> > > > > 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 <[EMAIL PROTECTED]<javascript:;>> > 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. > > >> > > >> > > > > > > -- Best regards, - Andy Problems worthy of attack prove their worth by hitting back. - Piet Hein (via Tom White)
-
Re: Can a RegionObserver coprocessor increment counter of a row key that may not belong to the region ?Amit Sela 2012-12-06, 13:42
Got it, so if my coprocessor is aggregating through the Increment that was
executed and I am using the aggregated values to increment a new counter in the *same row and same FAMILIES *but a different qualifier, I should be OK as long as I use * ObserverContext<RegionCoprocessorEnvironment>.getEnvironment().getRegion().incrementColumnValue() * ? * * On Thu, Dec 6, 2012 at 11:13 AM, Andrew Purtell <[EMAIL PROTECTED]> wrote: > If you as a coprocessor are not writing back to your own region, you are > probably doing it wrong. > > On Thursday, December 6, 2012, Amit Sela wrote: > > > 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 <[EMAIL PROTECTED] > <javascript:;>> > > 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 <[EMAIL PROTECTED] <javascript:;>> 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 <[EMAIL PROTECTED] > <javascript:;> > > > > > > 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 <[EMAIL PROTECTED] > <javascript:;>> > > 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. > > > >> > > > >> > > > > > > > > > > > > -- > Best regards, > > - Andy > > Problems worthy of attack prove their worth by hitting back. - Piet Hein > (via Tom White) >
-
Re: Can a RegionObserver coprocessor increment counter of a row key that may not belong to the region ?Toby Lazar 2012-12-06, 16:25
Does this exclude the use of coprocessors to update secondary indexes
(since they will likely be in a different table/region)? Is there a recommended approach to real-time secondary indexes that does not use coprocessors? Thanks, Toby On 12/6/12, Andrew Purtell <[EMAIL PROTECTED]> wrote: > If you as a coprocessor are not writing back to your own region, you are > probably doing it wrong. > > On Thursday, December 6, 2012, Amit Sela wrote: > >> 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 >> <[EMAIL PROTECTED]<javascript:;>> >> 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 <[EMAIL PROTECTED] <javascript:;>> 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 >> > > <[EMAIL PROTECTED]<javascript:;> >> > >> > 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 >> > >> <[EMAIL PROTECTED]<javascript:;>> >> 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. >> > >> >> > >> >> > > >> > >> > > > -- > Best regards, > > - Andy > > Problems worthy of attack prove their worth by hitting back. - Piet Hein > (via Tom White) > -- Sent from my mobile device
-
Can a RegionObserver coprocessor increment counter of a row key that may not belong to the region ?Andrew Purtell 2012-12-07, 07:57
It is a note of caution. Talking to another region could easily mean RPC,
if they are not somehow hosted on the same regionserver. Observer hooks are called from RPC handler context most often. The pool of handler threads is fixed. A naive approach to cross region communication could deadlock HBase. It's best to look for an alternative to cross region RPC on the server side, as a general point of advice IMHO. Your secondary index implementation could dispatch cross region work to an executor or thread pool. This would be safe but might not give the update semantics you want. On Friday, December 7, 2012, Toby Lazar wrote: > Does this exclude the use of coprocessors to update secondary indexes > (since they will likely be in a different table/region)? Is there a > recommended approach to real-time secondary indexes that does not use > coprocessors? > > Thanks, > > Toby > > On 12/6/12, Andrew Purtell <[EMAIL PROTECTED]> wrote: > > If you as a coprocessor are not writing back to your own region, you are > > probably doing it wrong. > > > > On Thursday, December 6, 2012, Amit Sela wrote: > > > >> 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 > >> <[EMAIL PROTECTED]<javascript:;>> > >> 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 <[EMAIL PROTECTED] <javascript:;>> 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 > >> > > <[EMAIL PROTECTED]<javascript:;> > >> > > >> > 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 > >> > >> <[EMAIL PROTECTED]<javascript:;>> > >> 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. > >> > >> > >> > >> > >> > > > >> > > >> > > > > > > -- > > Best regards, > > > > - Andy > > > > Problems worthy of attack prove their worth by hitting back. - Piet Hein > > (via Tom White) > > > Best regards, - Andy Problems worthy of attack prove their worth by hitting back. - Piet Hein (via Tom White)
-
Re: Can a RegionObserver coprocessor increment counter of a row key that may not belong to the region ?Asaf Mesika 2012-12-07, 08:15
But, if your counters are on the row keys, then just send one Increment objects, and have the hourly, daily columns in there, as well the general counter columns. Way easier than doing it by a region observer.
On 6 בדצמ 2012, at 15:42, Amit Sela <[EMAIL PROTECTED]> wrote: > Got it, so if my coprocessor is aggregating through the Increment that was > executed and I am using the aggregated values to increment a new counter in > the *same row and same FAMILIES *but a different qualifier, I should be OK > as long as I use * > ObserverContext<RegionCoprocessorEnvironment>.getEnvironment().getRegion().incrementColumnValue() > * > ? > * > * > On Thu, Dec 6, 2012 at 11:13 AM, Andrew Purtell <[EMAIL PROTECTED]> wrote: > >> If you as a coprocessor are not writing back to your own region, you are >> probably doing it wrong. >> >> On Thursday, December 6, 2012, Amit Sela wrote: >> >>> 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 <[EMAIL PROTECTED] >> <javascript:;>> >>> 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 <[EMAIL PROTECTED] <javascript:;>> 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 <[EMAIL PROTECTED] >> <javascript:;> >>>> >>>> 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 <[EMAIL PROTECTED] >> <javascript:;>> >>> 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. >>>>>> >>>>>> >>>>> >>>> >>> >> >> >> -- >> Best regards, >> >> - Andy >> >> Problems worthy of attack prove their worth by hitting back. - Piet Hein >> (via Tom White) >> |