Return-Path: X-Original-To: apmail-incubator-accumulo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-accumulo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 59C119AC7 for ; Mon, 17 Oct 2011 17:58:53 +0000 (UTC) Received: (qmail 21944 invoked by uid 500); 17 Oct 2011 17:58:53 -0000 Delivered-To: apmail-incubator-accumulo-commits-archive@incubator.apache.org Received: (qmail 21920 invoked by uid 500); 17 Oct 2011 17:58:53 -0000 Mailing-List: contact accumulo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: accumulo-dev@incubator.apache.org Delivered-To: mailing list accumulo-commits@incubator.apache.org Received: (qmail 21913 invoked by uid 99); 17 Oct 2011 17:58:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 17:58:53 +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; Mon, 17 Oct 2011 17:58:52 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2D7B52388A9C; Mon, 17 Oct 2011 17:58:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1185309 - /incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/filedata/ChunkCombiner.java Date: Mon, 17 Oct 2011 17:58:32 -0000 To: accumulo-commits@incubator.apache.org From: billie@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111017175832.2D7B52388A9C@eris.apache.org> Author: billie Date: Mon Oct 17 17:58:31 2011 New Revision: 1185309 URL: http://svn.apache.org/viewvc?rev=1185309&view=rev Log: ACCUMULO-15 fixed related findTop bug Modified: incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/filedata/ChunkCombiner.java Modified: incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/filedata/ChunkCombiner.java URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/filedata/ChunkCombiner.java?rev=1185309&r1=1185308&r2=1185309&view=diff ============================================================================== --- incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/filedata/ChunkCombiner.java (original) +++ incubator/accumulo/trunk/src/examples/src/main/java/org/apache/accumulo/examples/filedata/ChunkCombiner.java Mon Oct 17 17:58:31 2011 @@ -69,20 +69,21 @@ public class ChunkCombiner implements So } private void findTop() throws IOException { - topKey = null; - topValue = null; - + do { + topKey = null; + topValue = null; + } while (source.hasTop() && _findTop()==null); + } + + private byte[] _findTop() throws IOException { long maxTS; - if(!source.hasTop()) - return; - topKey = new Key(source.getTopKey()); topValue = new Value(source.getTopValue()); source.next(); if(!topKey.getColumnFamilyData().equals(FileDataIngest.CHUNK_CF_BS)) - return; + return topKey.getColumnVisibility().getBytes(); maxTS = topKey.getTimestamp(); @@ -102,9 +103,8 @@ public class ChunkCombiner implements So topKey.getColumnFamilyData().toArray(), topKey.getColumnQualifierData().toArray(), vis, maxTS); - } else { - findTop(); } + return vis; } private byte[] getVisFromRefs() throws IOException {