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 7B8409811 for ; Sat, 4 Aug 2012 00:48:05 +0000 (UTC) Received: (qmail 50676 invoked by uid 500); 4 Aug 2012 00:48:03 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 50626 invoked by uid 500); 4 Aug 2012 00:48:03 -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 50612 invoked by uid 99); 4 Aug 2012 00:48:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Aug 2012 00:48:03 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tombrown52@gmail.com designates 209.85.212.41 as permitted sender) Received: from [209.85.212.41] (HELO mail-vb0-f41.google.com) (209.85.212.41) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Aug 2012 00:47:56 +0000 Received: by vbkv13 with SMTP id v13so1484179vbk.14 for ; Fri, 03 Aug 2012 17:47:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=AqSCegzbHGL4eFFzDVGfOXUq0/FCJfLaLKqoVDtSow8=; b=numEx3bdyUnfhOsRKNcVggOLpOKPGyAZRG790epuvlCjC02dtVdXAVK3HCc5JM2pl1 M9ieDDvC5hyxlDLbZExR1E9njtp6fsXpZYO76Frgov36ta7tLUChJPRF1QgzSQRH5w+F xdaN6dhpyh6Q9OYSaJTG8FGkhPU+1HTEBjTKYzsM/Ts6dcZXmpUWiuT5TWD7eoBcnGE3 doMa8i+dIQxlsVj+qb93fgPWtjgB4UkquRQUATOVy+xDf4wTMkZGMikn4nIpgJ/w0UgN 6ADheP9J8/M8ptFim924etyHEZAJhFSNL+FjW8b6lqetf4uuWSWYfJbIyuW2+qJWSSMO lT3A== MIME-Version: 1.0 Received: by 10.220.150.15 with SMTP id w15mr2754158vcv.68.1344041255121; Fri, 03 Aug 2012 17:47:35 -0700 (PDT) Received: by 10.52.174.205 with HTTP; Fri, 3 Aug 2012 17:47:34 -0700 (PDT) In-Reply-To: <1344027939.39368.YahooMailNeo@web121701.mail.ne1.yahoo.com> References: <1344027939.39368.YahooMailNeo@web121701.mail.ne1.yahoo.com> Date: Fri, 3 Aug 2012 18:47:34 -0600 Message-ID: Subject: Re: Need to fast-forward a scanner inside a coprocessor From: Tom Brown To: user@hbase.apache.org, lars hofhansl Content-Type: text/plain; charset=ISO-8859-1 So I understand I'll need to upgrade to 0.94 (which won't be a problem because the releases are binary-compatible). I see that the RegionScanner interface contains the new method "reseek(byte[] row)". I have a reference to a RegionScanner in my coprocessor because I'm using: getEnvironment().getRegion().getScanner(scan). What I don't understand is your conditional statement "it depends specifically on where you hook this up". I'm not doing anything with "postScannerOpen". Since I have an instance of a RegionScanner, should I expect "reseek" to work, as long as I'm seeking forward? Is the way I'm using it up compatible with how it should work? --Tom On Fri, Aug 3, 2012 at 3:05 PM, lars hofhansl wrote: > We recently added a new API for that: > RegionScanner.reseek(...). See HBASE-5520. 0.94+ only, unfortunately. > > So it depends specifically on where you hook this up. If you do it at RegionObserver.postScannerOpen you can reseek forward at any time. > > > -- Lars > > > > ----- Original Message ----- > From: Tom Brown > To: user@hbase.apache.org > Cc: > Sent: Friday, August 3, 2012 1:27 PM > Subject: Need to fast-forward a scanner inside a coprocessor > > I have a custom coprocessor that aggregates a selection of records > from the table based various criteria. For efficiency, I would like to > make it skip a bunch of records. For example, if I don't need any > "AAAA" records and I encounter "AAAA0000", I would like to tell it to > skip everything until "AAAB.." > > I don't see any methods of the InternalScanner class that would give > me that ability. Do I need to close the current scanner and open a new > one? Does that add significant overhead (which would reduce any gains > achieved by skipping small numbers of records)? > > I am using HBase 0.92. Upgrading to 0.94 is possible if it gives this > functionality. > > --Tom >