Return-Path: X-Original-To: apmail-accumulo-dev-archive@www.apache.org Delivered-To: apmail-accumulo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2CEB510E6C for ; Wed, 4 Sep 2013 04:21:45 +0000 (UTC) Received: (qmail 17667 invoked by uid 500); 4 Sep 2013 04:21:45 -0000 Delivered-To: apmail-accumulo-dev-archive@accumulo.apache.org Received: (qmail 17229 invoked by uid 500); 4 Sep 2013 04:21:37 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 17213 invoked by uid 99); 4 Sep 2013 04:21:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Sep 2013 04:21:33 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jvines@gmail.com designates 209.85.217.174 as permitted sender) Received: from [209.85.217.174] (HELO mail-lb0-f174.google.com) (209.85.217.174) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Sep 2013 04:21:29 +0000 Received: by mail-lb0-f174.google.com with SMTP id w6so5708480lbh.19 for ; Tue, 03 Sep 2013 21:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=sdaE9Own4vBu+YWZPDMM6zH8Jb2o8pAlpiXKAXcAowg=; b=yJ336/PjPicCM0m0X8p8pOiND9gSNwuSFtMsEcWpxitJa5g816S0c1KBG5ClEcW65L wkgXNFqzqGC71vsFokiZRcovDFhr1aaGh9/Y+kSuXKW0nzBpt/YWaNhZIlwLjNqlH1Vc PyRBesXEC9YzKJFeaUXOD2EvwbtMY2Y7LvsO2lukqXmQuMFmCgpZHF0ObKLOemOjrmZU zZNhyzXMJWcjjtFtmHpBbNJXFnhdX6fnMka6xgjIvfXE2N2uF5bXMhbqpGwMYz1YQRsU ksFBgqFaBISuBe1I4eW4AiF/SIO9cSA/79C9Ewvbb94TJXy17lIadrf2YVfxpBPOuDoo pFZw== X-Received: by 10.152.21.165 with SMTP id w5mr59800lae.33.1378268467916; Tue, 03 Sep 2013 21:21:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.177.97 with HTTP; Tue, 3 Sep 2013 21:20:27 -0700 (PDT) In-Reply-To: References: From: John Vines Date: Wed, 4 Sep 2013 00:20:27 -0400 Message-ID: Subject: Re: StatsIterator - what is the significance of 23? To: Accumulo Dev List Content-Type: multipart/alternative; boundary=089e0158b6dc6f72ee04e58722fe X-Virus-Checked: Checked by ClamAV on apache.org --089e0158b6dc6f72ee04e58722fe Content-Type: text/plain; charset=ISO-8859-1 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 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 >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 --089e0158b6dc6f72ee04e58722fe--