Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

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


+
David Medinets 2013-09-04, 01:29
Copy link to this message
-
Re: StatsIterator - what is the significance of 23?
It looks like this is part of ACCUMULO-517? 23 does seem pretty
arbitrary. I'm guessing Keith chose that number after some
experimentation to ensure it was low enough to keep the counters
up-to-date, but high enough to avoid a lot of synchronization
overhead.

--
Christopher L Tubbs II
http://gravatar.com/ctubbsii
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.
+
Mike Drob 2013-09-04, 02:17
+
John Vines 2013-09-04, 04:20
+
Michael Berman 2013-09-06, 18:27
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB