Return-Path: X-Original-To: apmail-accumulo-user-archive@www.apache.org Delivered-To: apmail-accumulo-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5FFD5C960 for ; Wed, 6 Jun 2012 17:40:04 +0000 (UTC) Received: (qmail 77511 invoked by uid 500); 6 Jun 2012 17:40:04 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 77449 invoked by uid 500); 6 Jun 2012 17:40:04 -0000 Mailing-List: contact user-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@accumulo.apache.org Delivered-To: mailing list user@accumulo.apache.org Received: (qmail 77433 invoked by uid 99); 6 Jun 2012 17:40:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2012 17:40:03 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [75.150.60.225] (HELO adam.ccri.com) (75.150.60.225) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2012 17:39:57 +0000 Received: from [192.168.1.63] (unknown [192.168.1.63]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by adam.ccri.com (Postfix) with ESMTPSA id 540BF26039E for ; Wed, 6 Jun 2012 13:39:29 -0400 (EDT) Message-ID: <4FCF95CD.7070109@ccri.com> Date: Wed, 06 Jun 2012 13:39:25 -0400 From: Hunter Provyn User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: user@accumulo.apache.org Subject: how to use CountingIterator to count records? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I want to know the number of records a scanner has without actually getting the records from cloudbase. I've been looking at CountingIterator (1.3.4), which has a getCount() method. However, I don't know how to access the instance to call getCount() on it because Cloudbase server just passes back the entries and doesn't expose the instance of the iterator. It is possible to use an AggregatingIterator to aggregate all entries into a single entry whose value is the number of entries. But I was wondering if there was a better way that possibly makes use of the CountingIterator class.