Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-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 14F0310BBE for ; Fri, 17 Jan 2014 10:04:02 +0000 (UTC) Received: (qmail 20958 invoked by uid 500); 17 Jan 2014 10:03:58 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 20912 invoked by uid 500); 17 Jan 2014 10:03:57 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 20904 invoked by uid 99); 17 Jan 2014 10:03:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jan 2014 10:03:55 +0000 X-ASF-Spam-Status: No, hits=3.2 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yuzhihong@gmail.com designates 209.85.192.181 as permitted sender) Received: from [209.85.192.181] (HELO mail-pd0-f181.google.com) (209.85.192.181) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jan 2014 10:03:49 +0000 Received: by mail-pd0-f181.google.com with SMTP id y10so258358pdj.26 for ; Fri, 17 Jan 2014 02:03:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=mKt/3FMtCQPO8oU6t+pwJmjbnuaj376UmdwwYsYWAb8=; b=vHez2EeHmVE5j/gsjv3qAkkIB9X8IBCI4hUiwfuM5HxbywcuGb4yJdwqYzfDFP7HnO v4uJRtb3gcELceO4Ek4Anczu5nluh5sUZg/zF+TFv1U/0l1c/2aBjBW3HuAWAIkofdoX xOyqgoXZBWho4QdT1W3twQJ56buCxRhCNuFmyvFGOMShtbw0Sitw0fnbYQXeirJ9fc8f Jp5uelsJOb1A8Qc17cpnrAkJydd+Zep1ZdQX1qIkzhABrrm51WGvQAc7gsEKhngoEyy+ ja5l2vJZ8WsweUYV4WDqINf77yWoQJ/sTWuEBQ9LfeLwzkHKdoHLwLyAqrZ1Y6E7p4qK i23Q== X-Received: by 10.66.119.172 with SMTP id kv12mr1209166pab.34.1389953009018; Fri, 17 Jan 2014 02:03:29 -0800 (PST) Received: from [192.168.0.13] (c-24-130-236-83.hsd1.ca.comcast.net. [24.130.236.83]) by mx.google.com with ESMTPSA id lh13sm28848358pab.4.2014.01.17.02.03.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 02:03:27 -0800 (PST) References: <2014011715585004249114@gmail.com> Mime-Version: 1.0 (1.0) In-Reply-To: <2014011715585004249114@gmail.com> Content-Type: multipart/alternative; boundary=Apple-Mail-D02EA998-B6F9-485E-B7BC-05E2A77EB898 Content-Transfer-Encoding: 7bit Message-Id: <9E6A640C-CFD7-49A5-A73E-FAC5DC931487@gmail.com> Cc: user X-Mailer: iPhone Mail (10B146) From: Ted Yu Subject: Re: How to quickly count the rows that meet several conditions using hbase coprocessor Date: Fri, 17 Jan 2014 02:03:26 -0800 To: "user@hbase.apache.org" X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-D02EA998-B6F9-485E-B7BC-05E2A77EB898 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Take a look at http://hbase.apache.org/0.94/apidocs/org/apache/hadoop/hbase/= client/coprocessor/AggregationClient.html#rowCount(byte[],%20org.apache.hado= op.hbase.coprocessor.ColumnInterpreter,%20org.apache.hadoop.hbase.client.Sca= n) You can pass custom filter through Scan parameter.=20 Cheers On Jan 16, 2014, at 11:58 PM, "leiwangouc@gmail.com" w= rote: > Hi, >=20 > I know that hbase copocessor provides a quick way to count the rows of a t= able. > But how can i count the rows that meet several conditions. >=20 > Take this for example.=20 > I have a hbase table with one column family, several columns. I want to ca= culate the number of rows that meet 3 conditions: > has column1 > has column2 > has column3 and the value of column3 satisfy a regular expression >=20 > Thans, > Lei >=20 >=20 >=20 > leiwangouc@gmail.com --Apple-Mail-D02EA998-B6F9-485E-B7BC-05E2A77EB898--