Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 18C299DDB for ; Fri, 23 Sep 2011 17:52:17 +0000 (UTC) Received: (qmail 23364 invoked by uid 500); 23 Sep 2011 17:52:17 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 23331 invoked by uid 500); 23 Sep 2011 17:52:16 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 23323 invoked by uid 99); 23 Sep 2011 17:52:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Sep 2011 17:52:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Sep 2011 17:52:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D4EC5238888F for ; Fri, 23 Sep 2011 17:51:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1174920 - in /hbase/branches/0.92: CHANGES.txt src/main/java/org/apache/hadoop/hbase/mapred/RowCounter.java src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java Date: Fri, 23 Sep 2011 17:51:52 -0000 To: commits@hbase.apache.org From: stack@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20110923175152.D4EC5238888F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: stack Date: Fri Sep 23 17:51:52 2011 New Revision: 1174920 URL: http://svn.apache.org/viewvc?rev=1174920&view=rev Log: HBASE-4295 rowcounter does not return the correct number of rows in certain circumstances Modified: hbase/branches/0.92/CHANGES.txt hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/mapred/RowCounter.java hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java Modified: hbase/branches/0.92/CHANGES.txt URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1174920&r1=1174919&r2=1174920&view=diff ============================================================================== --- hbase/branches/0.92/CHANGES.txt (original) +++ hbase/branches/0.92/CHANGES.txt Fri Sep 23 17:51:52 2011 @@ -626,6 +626,8 @@ Release 0.90.5 - Unreleased running zk with new format root servername HBASE-4387 Error while syncing: DFSOutputStream is closed (Lars Hofhansl) + HBASE-4295 rowcounter does not return the correct number of rows in + certain circumstances (David Revell) IMPROVEMENT HBASE-4205 Enhance HTable javadoc (Eric Charles) Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/mapred/RowCounter.java URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/mapred/RowCounter.java?rev=1174920&r1=1174919&r2=1174920&view=diff ============================================================================== --- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/mapred/RowCounter.java (original) +++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/mapred/RowCounter.java Fri Sep 23 17:51:52 2011 @@ -58,20 +58,8 @@ public class RowCounter extends Configur OutputCollector output, Reporter reporter) throws IOException { - boolean content = false; - - for (KeyValue value: values.list()) { - if (value.getValue().length > 0) { - content = true; - break; - } - } - if (!content) { - // Don't count rows that are all empty values. - return; - } - // Give out same value every time. We're only interested in the row/key - reporter.incrCounter(Counters.ROWS, 1); + // Count every row containing data, whether it's in qualifiers or values + reporter.incrCounter(Counters.ROWS, 1); } public void configure(JobConf jc) { Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java?rev=1174920&r1=1174919&r2=1174920&view=diff ============================================================================== --- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java (original) +++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java Fri Sep 23 17:51:52 2011 @@ -65,12 +65,8 @@ public class RowCounter { public void map(ImmutableBytesWritable row, Result values, Context context) throws IOException { - for (KeyValue value: values.list()) { - if (value.getValue().length > 0) { - context.getCounter(Counters.ROWS).increment(1); - break; - } - } + // Count every row containing data, whether it's in qualifiers or values + context.getCounter(Counters.ROWS).increment(1); } }