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 D1216188C9 for ; Mon, 9 Nov 2015 15:25:25 +0000 (UTC) Received: (qmail 98198 invoked by uid 500); 9 Nov 2015 15:25:25 -0000 Delivered-To: apmail-accumulo-dev-archive@accumulo.apache.org Received: (qmail 98157 invoked by uid 500); 9 Nov 2015 15:25:25 -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 98140 invoked by uid 99); 9 Nov 2015 15:25:25 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Nov 2015 15:25:25 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id E36511A0B50 for ; Mon, 9 Nov 2015 15:25:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.193 X-Spam-Level: * X-Spam-Status: No, score=1.193 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id ia_8QSZ9pjmB for ; Mon, 9 Nov 2015 15:25:16 +0000 (UTC) Received: from mail-yk0-f179.google.com (mail-yk0-f179.google.com [209.85.160.179]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 9F9F84419E for ; Mon, 9 Nov 2015 15:25:16 +0000 (UTC) Received: by ykdv3 with SMTP id v3so179910973ykd.0 for ; Mon, 09 Nov 2015 07:25:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=ZUf1iENAFQGmhAtC/o0cwVVXCBilAFdeIe1ld62tH+I=; b=I/+21+tgrP3Ry7eu2QkRu/NUVTtXeDLvLhjF7KbdkL6tB7H4R/ZUs0z7bnGIp+M6lV R4hhX15xwE+atGjQWFQl3rAmhDyUzzqBKMhUhtQKaAApvNDSPp+ikvEVFSByVz9vx1Wt qRhLMsNvEAhxzY7CCwb85ORcgiJQGpRWwQGrVPyPMDLx355uQUhRPkbIGyacXIMKmOLI nGSvUU2QJBDk3b1K3E3FZ9A4zTbVSwZ7tbPPws4Co33uf5VCtttMEZXaUCntrZJaO0O/ WQN0pxEVkgy68TB9NUGoIWALpjxzgDQsaH8shjE89o2VqV3tVve9QA5ZGNDTiF+oInR/ PuSQ== X-Received: by 10.129.46.212 with SMTP id u203mr26718725ywu.147.1447082716356; Mon, 09 Nov 2015 07:25:16 -0800 (PST) Received: from hw10447.local (pool-68-134-10-53.bltmmd.fios.verizon.net. [68.134.10.53]) by smtp.googlemail.com with ESMTPSA id v141sm12792155ywa.24.2015.11.09.07.25.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Nov 2015 07:25:15 -0800 (PST) Message-ID: <5640BAD9.4090301@gmail.com> Date: Mon, 09 Nov 2015 10:25:13 -0500 From: Josh Elser User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: dev@accumulo.apache.org Subject: Re: total table rows References: <1447081229522-15484.post@n5.nabble.com> In-Reply-To: <1447081229522-15484.post@n5.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Yeah, there's no explicit tracking of all rows in Accumulo, you're stuck with enumerating them (or explicitly tracking them yourself at ingest time). The easiest approach you can take is probably using the FirstEntryInRowIterator and counting each row on the client-side. You could do another summation in a second iterator but this is a little tricky to get correct. I tried to touch on this a little in a blog post[1]. If this is a one-off question you want to answer, doing the summation on the client side is likely not to take excessively longer than a server-side summation. [1] https://blogs.apache.org/accumulo/entry/thinking_about_reads_over_accumulo z11373 wrote: > I want to get total rows of a table (likely has more than 100M rows), I think > to get that information, Accumulo would have to iterate all rows :-( This > may not be typical Accumulo scenario. > > Is there a more efficient way to get total number of rows in a table? > When Accumulo iterating those items, does it mean it will pull the data to > the client? If yes, is there a way to ask it to return just the number, > since that's the only data I care. > > Thanks, > Z > > > > -- > View this message in context: http://apache-accumulo.1065345.n5.nabble.com/total-table-rows-tp15484.html > Sent from the Developers mailing list archive at Nabble.com.