Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Accumulo >> mail # dev >> StatsIterator - what is the significance of 23?


Copy link to this message
-
Re: StatsIterator - what is the significance of 23?
I think probably it's 23 because 2+3=5.  I find the Law of Fives to be more
and more manifest the harder I look.
On Wed, Sep 4, 2013 at 12:20 AM, John Vines <[EMAIL PROTECTED]> wrote:

> For a similar fun read, check out reasoning for the implementation of
> String's hashCode()
>
>
> On Tue, Sep 3, 2013 at 10:17 PM, Mike Drob <[EMAIL PROTECTED]> wrote:
>
> > At a guess, it looks like a small prime intended to decrease the amount
> of
> > atomic operations.
> >
> > Completely unrelated, but this made me think of Feynman and the
> mysterious
> > number 137.
> >
> >
> > On Tue, Sep 3, 2013 at 9:29 PM, David Medinets <[EMAIL PROTECTED]
> > >wrote:
> >
> > > At the risk of having overlooked something obvious, I was curious about
> > the
> > > occurrence of 23 in the StatsIterator code:
> > >
> > >   public void next() throws IOException {
> > >     super.next();
> > >     numRead++;
> > >
> > >     if (numRead % 23 == 0) {
> > >       readCounter.addAndGet(numRead);
> > >       numRead = 0;
> > >     }
> > >   }
> > >
> > > I'm also wondering about the StatsIterator in general. The member
> > variables
> > > are all private. They are incremented but never used.
> > >
> >
>
>
>
> --
> Cheers
> ~John
>