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 65E9F9CF4 for ; Wed, 22 Feb 2012 01:48:06 +0000 (UTC) Received: (qmail 88991 invoked by uid 500); 22 Feb 2012 01:48:04 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 88946 invoked by uid 500); 22 Feb 2012 01:48:04 -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 88936 invoked by uid 99); 22 Feb 2012 01:48:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 01:48:04 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nneverwei@gmail.com designates 209.85.210.169 as permitted sender) Received: from [209.85.210.169] (HELO mail-iy0-f169.google.com) (209.85.210.169) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 01:47:58 +0000 Received: by iagz16 with SMTP id z16so13266940iag.14 for ; Tue, 21 Feb 2012 17:47:37 -0800 (PST) Received-SPF: pass (google.com: domain of nneverwei@gmail.com designates 10.43.52.129 as permitted sender) client-ip=10.43.52.129; Authentication-Results: mr.google.com; spf=pass (google.com: domain of nneverwei@gmail.com designates 10.43.52.129 as permitted sender) smtp.mail=nneverwei@gmail.com; dkim=pass header.i=nneverwei@gmail.com Received: from mr.google.com ([10.43.52.129]) by 10.43.52.129 with SMTP id vm1mr30603323icb.15.1329875257429 (num_hops = 1); Tue, 21 Feb 2012 17:47:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=pXcYAAItfjFoldLWrqHZOQsYtblSxFj1M+DUUSWmNes=; b=nSLhBjerLtQYSSYASnQViRRuY7VKXusVjFb+VDzqt+H1Qka/kWzPQsNOEvlibzd2tl HECkqwUYFZ2FcinpnOgPsd/0S/4t8kxNx7BD82RgdX4A8Rzhlh0ny8x06Husfy4jSf8f hEE03NjKSvj4SQ9Dv7DmSgUkBak3Ei7NobXOM= Received: by 10.43.52.129 with SMTP id vm1mr24502097icb.15.1329875257341; Tue, 21 Feb 2012 17:47:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.43.45.72 with HTTP; Tue, 21 Feb 2012 17:47:17 -0800 (PST) In-Reply-To: <0FBA062F-FF39-4B90-8784-79F2BDD77B6C@gmail.com> References: <0FBA062F-FF39-4B90-8784-79F2BDD77B6C@gmail.com> From: NNever Date: Wed, 22 Feb 2012 09:47:17 +0800 Message-ID: Subject: Re: HBase0.92: In Filter, ReturnCode.NEXT_ROW may lead to next columnFamily but not next row? To: user@hbase.apache.org, yuzhihong@gmail.com Content-Type: multipart/mixed; boundary=bcaec51a759e4f383a04b983b6e3 --bcaec51a759e4f383a04b983b6e3 Content-Type: multipart/alternative; boundary=bcaec51a759e4f383704b983b6e1 --bcaec51a759e4f383704b983b6e1 Content-Type: text/plain; charset=ISO-8859-1 Attach is my test customFilter code --- TestFilter. It just simply extends FilterBase and do some system.out... You can just try any Table has more than one columnFamily like below: *Scan scan = new Scan();* *scan.setFilter(new TestFilter());* *hTable.getScanner(scan);* and look the HBase's log... It seems there is truely a BUG here....When filterKeyValue return ReturnCode.NEXT_ROW, it jump to next columnFamily but not next row... also there is one thing strange, why the fitlerRow() not be called? 2012/2/21 > The javadoc says filterRow() will still be called. > > Can you show us your filterRow() code ? > > Thanks > > > > On Feb 21, 2012, at 7:28 AM, NNever wrote: > > > Hi~ > > > > One customFilter, Override filterKeyValue(KeyValue v). > > when the filter filterKeyValue a row's first keyValue, it will return > > "ReturnCode.NEXT_ROW" to jump to next row. > > > > But what infact is, the result changes when there are more than one > > columnFamily:(here are some logs) > > > > [filterRowKey] PERSONA1 > > [filterKeyValue] family:info | qualifier:active | value:\x00 > > [filterKeyValue] returnCode is NEXT_ROW > > [reset] > > [filterRowKey] PERSONA2 > > [filterKeyValue] family:info | qualifier:active | value:\x00 > > [filterKeyValue] returnCode is NEXT_ROW > > [reset] > > [filterRowKey] PERSONA3 > > [filterKeyValue] family:info | qualifier:active | value:\x00 > > [filterKeyValue] returnCode is NEXT_ROW > > [filterKeyValue] family:npo | qualifier:059201 | value: > > [filterKeyValue] returnCode is NEXT_ROW > > [reset] > > [filterRowKey] PERSONA4 > > [filterKeyValue] family:cert | qualifier:certSN | value: > > PERSONAL4314120472582094317514215676313826416149 > > [filterKeyValue] returnCode is NEXT_ROW > > [filterKeyValue] family:info | qualifier:active | value:\x00 > > [filterKeyValue] returnCode is NEXT_ROW > > [filterKeyValue] family:npo | qualifier:059201 | value: > > [filterKeyValue] returnCode is NEXT_ROW > > [reset] > > > > the Table schema is > > User > > info:name, info:address, info:active.... (info family, every record has > > values) > > npo:xxxx.....(npo family may be not exist) > > cert:certSN, cert:certType....(cert family may be not exist) > > > > As you can see from the log, once a row has more than one family values, > > The ReturnCode.NEXT_ROW will not jump to next row but pass the left > > qualifier values and jump to next fmaily. > > Why? It's a bug or just design to be like this? > > Thanks~ > --bcaec51a759e4f383704b983b6e1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Attach is my test customFilter code --- TestFilter.
It just simply exte= nds FilterBase and do some system.out...
You can just try any Tab= le has more than one columnFamily like below:

S= can scan =3D new Scan();
scan.setFilter(new TestFilter());
hTable.getScanne= r(scan);

and look the HBase's log...
=

It seems there is truely a BUG here....When filterKeyVa= lue return ReturnCode.NEXT_ROW, it jump to next columnFamily but not next r= ow...
also there is one thing strange, why the fitlerRow() not be called?

2012/2/21 <yuzhihong@gmail.com>
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex"> The javadoc says filterRow() will still be called.

Can you show us your filterRow() code ?

Thanks



On Feb 21, 2012, at 7:28 AM, NNever <nneverwei@gmail.com> wrote:

> Hi~
>
> One customFilter, =A0Override filterKeyValue(KeyValue v).
> when the filter filterKeyValue a row's first keyValue, it will ret= urn
> "ReturnCode.NEXT_ROW" to jump to next row.
>
> But what infact is, the result changes when there are more than one > columnFamily:(here are some logs)
>
> [filterRowKey] PERSONA1
> [filterKeyValue] family:info | qualifier:active | value:\x00
> [filterKeyValue] returnCode is NEXT_ROW
> [reset]
> [filterRowKey] PERSONA2
> [filterKeyValue] family:info | qualifier:active | value:\x00
> [filterKeyValue] returnCode is NEXT_ROW
> [reset]
> [filterRowKey] PERSONA3
> [filterKeyValue] family:info | qualifier:active | value:\x00
> [filterKeyValue] returnCode is NEXT_ROW
> [filterKeyValue] family:npo | qualifier:059201 | value:
> [filterKeyValue] returnCode is NEXT_ROW
> [reset]
> [filterRowKey] PERSONA4
> [filterKeyValue] family:cert | qualifier:certSN | value:
> PERSONAL4314120472582094317514215676313826416149
> [filterKeyValue] returnCode is NEXT_ROW
> [filterKeyValue] family:info | qualifier:active | value:\x00
> [filterKeyValue] returnCode is NEXT_ROW
> [filterKeyValue] family:npo | qualifier:059201 | value:
> [filterKeyValue] returnCode is NEXT_ROW
> [reset]
>
> the Table schema is
> User
> info:name, info:address, info:active.... (info family, every record ha= s
> values)
> npo:xxxx.....(npo family may be not exist)
> cert:certSN, cert:certType....(cert family may be not exist)
>
> As you can see from the log, once a row has more than one family value= s,
> The ReturnCode.NEXT_ROW will not jump to next row but pass the left > qualifier values and jump to next fmaily.
> Why? It's a bug or just design to be like this?
> Thanks~

--bcaec51a759e4f383704b983b6e1-- --bcaec51a759e4f383a04b983b6e3--