You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Gaetan Deputier <gd...@ividence.com> on 2013/05/02 18:19:51 UTC

Sharing counter values between mappers

Hello Hbase users,

I have a question about counters. Is there any way to synchronize counter
values between mappers ?

E.g : I have a counter i incremented at each map call and I would like to
stop each mapper once i has reached a threshold.

Sincerely,

G.

Re: Sharing counter values between mappers

Posted by Gaetan Deputier <gd...@ividence.com>.
I was talking about context counters (the old reporter counters). But maybe
storing counters in hbase is a way to achieve what I want.


On Thu, May 2, 2013 at 9:22 AM, Ted Yu <yu...@gmail.com> wrote:

> Take a look at the following method in HTable:
>
>    * @return The new value, post increment.
>
>    * @throws IOException if a remote or network exception occurs.
>
>    */
>
>   long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier,
>
>       long amount) throws IOException;
>
> On Thu, May 2, 2013 at 9:19 AM, Gaetan Deputier <gd...@ividence.com> wrote:
>
> > Hello Hbase users,
> >
> > I have a question about counters. Is there any way to synchronize counter
> > values between mappers ?
> >
> > E.g : I have a counter i incremented at each map call and I would like to
> > stop each mapper once i has reached a threshold.
> >
> > Sincerely,
> >
> > G.
> >
>

Re: Sharing counter values between mappers

Posted by Ted Yu <yu...@gmail.com>.
Take a look at the following method in HTable:

   * @return The new value, post increment.

   * @throws IOException if a remote or network exception occurs.

   */

  long incrementColumnValue(byte[] row, byte[] family, byte[] qualifier,

      long amount) throws IOException;

On Thu, May 2, 2013 at 9:19 AM, Gaetan Deputier <gd...@ividence.com> wrote:

> Hello Hbase users,
>
> I have a question about counters. Is there any way to synchronize counter
> values between mappers ?
>
> E.g : I have a counter i incremented at each map call and I would like to
> stop each mapper once i has reached a threshold.
>
> Sincerely,
>
> G.
>