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 4DE781090F for ; Thu, 18 Apr 2013 02:40:45 +0000 (UTC) Received: (qmail 44292 invoked by uid 500); 18 Apr 2013 02:40:44 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 44212 invoked by uid 500); 18 Apr 2013 02:40:44 -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 44198 invoked by uid 99); 18 Apr 2013 02:40:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Apr 2013 02:40:44 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rkreddy@gmail.com designates 209.85.215.50 as permitted sender) Received: from [209.85.215.50] (HELO mail-la0-f50.google.com) (209.85.215.50) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Apr 2013 02:40:39 +0000 Received: by mail-la0-f50.google.com with SMTP id el20so2070372lab.23 for ; Wed, 17 Apr 2013 19:40:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=FU5YYtKnRKhPb6Stk9+9dkIKpaJLsvK5OuuWHcfFLUc=; b=PU32MtIh75+0JjKGlc38/5j8HX1Sbh+0/SIZGfx3X1r7nSCxMFKv3ypjJCfHiXwZQj A6XyaKpFb0mZKL5OxznsBo5vb6bM2MWg3581xOQUVAo4teuaUC/IFCIAwiNgzxJhgvgO EFfq1hKTDQTLT93P02lwyb3IVYF4fpermHLLnB5C6Mppcta6CUc8fzaf+w2zdnZ2DhVg u8OhCbI81xReR6DEKCfzFxNOVGRaEcKvk7juGMshJdod/+rdHGY5kvEumk9CV613mFqi Mslrhq2ZRRuPSqyAQ8tzVdxtd2iDV/Qq53+iNQjia/UxlshHnpFw47ttu1AmtUkhUSTV z76g== MIME-Version: 1.0 X-Received: by 10.112.125.134 with SMTP id mq6mr4860983lbb.33.1366252818259; Wed, 17 Apr 2013 19:40:18 -0700 (PDT) Received: by 10.112.42.130 with HTTP; Wed, 17 Apr 2013 19:40:18 -0700 (PDT) In-Reply-To: References: Date: Wed, 17 Apr 2013 22:40:18 -0400 Message-ID: Subject: Re: row count From: Venkat To: user@accumulo.apache.org Content-Type: multipart/alternative; boundary=089e0115ef06e7e77c04da99857b X-Virus-Checked: Checked by ClamAV on apache.org --089e0115ef06e7e77c04da99857b Content-Type: text/plain; charset=ISO-8859-1 I did the RowIterator and did a count of the rows ... it came out pretty fast but definitely not the best efficient wise. Thanks everyone. On Wed, Apr 17, 2013 at 10:42 AM, Keith Turner wrote: > On Tue, Apr 16, 2013 at 9:33 PM, Venkat wrote: > > I am sure this question has been asked several times but I could not get > to > > the answer using usual searches - which iterator is the right one to > count > > the number of rows for a given value or a pattern of value ? > > Take a look at org.apache.accumulo.core.iterators.FirstEntryInRowIterator. > Does anyone know why this is not in the user iterator package? Is > there an issue with it? This will bring back the first key/value for > each row, then you could count those on the client side. This will > work for a range. For a pattern, David's suggestion of the regex > filter may be useful. You could also look in the > org.apache.accumulo.core.iterators.user.RowFilter. > > You could use FirstEntryInRowIterator and RegEx or RowFilter, but you > would have to be careful about the order of the iterators. > > > > > Venkat. > --089e0115ef06e7e77c04da99857b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I did the RowIterator and did a count of the rows ... it c= ame out pretty fast but=A0definitely=A0not the best efficient wise. =A0Than= ks everyone.


On Wed, Apr 17, 2013 at 10:42 AM, Keith Turner <<= a href=3D"mailto:keith@deenlo.com" target=3D"_blank">keith@deenlo.com&g= t; wrote:
On T= ue, Apr 16, 2013 at 9:33 PM, Venkat <rkreddy@gmail.com> wrote:
> I am sure this question has been asked several times but I could not g= et to
> the answer using usual searches - which iterator is the right one to c= ount
> the number of rows for a given value or a pattern of value ?

Take a look at org.apache.accumulo.core.iterators.FirstEntryInR= owIterator.
=A0Does anyone know why this is not in the user iterator package? =A0Is
there an issue with it? =A0This will bring back the first key/value for
each row, then you could count those on the client side. =A0 This will
work for a range. =A0For a pattern, David's suggestion of the regex
filter may be useful. =A0 You could also look in the
org.apache.accumulo.core.iterators.user.RowFilter.

You could use FirstEntryInRowIterator and RegEx or RowFilter, but you
would have to be careful about the order of the iterators.

>
> Venkat.

--089e0115ef06e7e77c04da99857b--