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 AB3AD1083E for ; Mon, 1 Jul 2013 19:01:34 +0000 (UTC) Received: (qmail 90302 invoked by uid 500); 1 Jul 2013 19:01:32 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 90234 invoked by uid 500); 1 Jul 2013 19:01:32 -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 90226 invoked by uid 99); 1 Jul 2013 19:01:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jul 2013 19:01:32 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [72.30.239.209] (HELO nm40-vm1.bullet.mail.bf1.yahoo.com) (72.30.239.209) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jul 2013 19:01:25 +0000 Received: from [98.139.212.152] by nm40.bullet.mail.bf1.yahoo.com with NNFMP; 01 Jul 2013 19:01:04 -0000 Received: from [98.139.212.229] by tm9.bullet.mail.bf1.yahoo.com with NNFMP; 01 Jul 2013 19:01:04 -0000 Received: from [127.0.0.1] by omp1038.mail.bf1.yahoo.com with NNFMP; 01 Jul 2013 19:01:04 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 499553.36366.bm@omp1038.mail.bf1.yahoo.com Received: (qmail 80208 invoked by uid 60001); 1 Jul 2013 19:01:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1372705264; bh=QpWS6IRcK44VOmzsWo4ePmSXMLCpRWwkWK/vIxA93do=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-RocketYMMF:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=nWeSVqXToIfZ70gefrNlmfhOY9l2BuFKr10Snqz7MraQ2SPOo7LIZDpbINAF9KKDl9Fq6989ACWeRO/2aJVzxKeQuuue9cVRf83DSIMx636I07YxVZofKwdtRAlxk7eXcmz8muP0k4VTyOVwzjWKGpPT4hOqilUyfPfalKvh8r0= X-YMail-OSG: VAzsQYgVM1k5AqC.dIGKL0t4MsCMbUYZNC_4Gkk.SwoWcZy di2h1owuN1XmAmaujyKRlxP6pUMcDwFoVITNkmJLlIwh70i6N6nfNBE4ci61 D1AtL2Db3EITu15K4S39QmuTucBSzluZQ4GjqZu1oeaZdQLCn5E9n2a9dMG3 0RCNvGkubDwqTRbOeO75HFFG4DajybE9c8eyhBPpVrUifUGimEuT2r9YdNiL rpgaHp4UK6J1hi2D1Y4MmCQ8KQ9K_TmPKM.q61kYjGO84VIlA7dbA0FaUuiu 5NYsG4B3pHFjrLDcWQ3kdHnQt3HylEyHFGoNjiWvHr64.9d6nSqv.wNII3Ar gu91mcaDGPB19iyzCwrZvrVdrlrKCd5W9Pr0jrbnpboioy9Z76qqQbcaTiHF YquHLe1wEFmmUmaC8dPx0KqPTiXJdU9Dp20V0cd_5FIRtHBVhbt3XZws3ZLm hE_Ap7yzaAjx7PU7NpoC84RtNXUGktXyDw2aq2tuSXQ.HGi02g.pXGiJA21_ lpL63mrsxYYna32DYqTCSU3DcJcTrp2JSI3BKREpIeRJbbpaDrEVyXVjgfYr jD9EY5WOxZE96V8Q9Zj9NpVQkM8Vx1QzfbOFJn2LTZB8ZcETzpztefs17fP_ ID00mAXgZTeOKPJWqbdk2.XSBMkI5GbDCshzWW7nSA3b8J0xMIB9dt6.XX.x V1xW1jC5tFeuPNtl2CLugHw4Wt0dwlVT7rLlH_Lp7v48t7tA3MTIkKTsRcMc UO0Px2nXhBP0zlHt_xrFTiLVIL9dNe5ScIfSZMMac0XdhIgjr Received: from [93.213.42.112] by web140603.mail.bf1.yahoo.com via HTTP; Mon, 01 Jul 2013 12:01:04 PDT X-Rocket-MIMEInfo: 002.001,SXQgd291bGQgbWFrZSBzZW5zZSwgYnV0IGl0IGlzIG5vdCBpbW1lZGlhdGVseSBjbGVhciBob3cgdG8gZG8gc28gY2xlYW5seS4gV2Ugd291bGQgbm8gbG9uZ2VyIGJlIGFibGUgdG8gY2FsbCB0cmFuc2Zvcm0gYXQgdGhlIFN0b3JlU2Nhbm5lciBsZXZlbCAob3IgZXZhbHVhdGUgdGhlIGZpbHRlciBtdWx0aXBsZSB0aW1lcywgb3IgcmVxdWlyZSB0aGUgZmlsdGVycyB0byBtYWludGFpbiB0aGVpciAtIGxhc3QgLSBzdGF0ZSBhbmQgb25seSBhcHBseSB0cmFuc2Zvcm0gc2VsZWN0aXZlbHkpLgoKSSBhZGRlZCABMAEBAQE- X-RocketYMMF: lhofhansl X-Mailer: YahooMailWebService/0.8.148.557 References: <1372677275.83181.YahooMailNeo@web140601.mail.bf1.yahoo.com> Message-ID: <1372705264.79838.YahooMailNeo@web140603.mail.bf1.yahoo.com> Date: Mon, 1 Jul 2013 12:01:04 -0700 (PDT) From: lars hofhansl Reply-To: lars hofhansl Subject: Re: Behavior of Filter.transform() in FilterList? To: Christophe Taton , "user@hbase.apache.org" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-1172831624-845832186-1372705264=:79838" X-Virus-Checked: Checked by ClamAV on apache.org ---1172831624-845832186-1372705264=:79838 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable It would make sense, but it is not immediately clear how to do so cleanly. = We would no longer be able to call transform at the StoreScanner level (or = evaluate the filter multiple times, or require the filters to maintain thei= r - last - state and only apply transform selectively).=0A=0AI added transf= orm() a while ago in order to allow a Filter *not* to transform. Before eac= h we defensively made a copy of the key, just in case a Filter (such as Key= OnlyFilter) would modify it, now this is a formalized, and the filter is re= sponsible for making a copy only when needed.=0A=0A=0A-- Lars=0A=0A=0A=0A__= ______________________________=0A From: Christophe Taton =0ATo: user@hbase.apache.org; lars hofhansl =0ASent: M= onday, July 1, 2013 10:27 AM=0ASubject: Re: Behavior of Filter.transform() = in FilterList?=0A =0A=0A=0AOn Mon, Jul 1, 2013 at 4:14 AM, lars hofhansl wrote:=0A=0AYou want transform to only be called on filter= s that are "reached"?=0A>I.e. FilterA and FilterB, FilterB.transform should= not be called if a KV is already filtered by FilterA?=0A>=0A=0AYes, that's= what I naively expected, at first.=0A=0AThat's not how it works right now,= transform is called in a completely different code path from the actual fi= ltering logic.=0A>=0A=0AIndeed, I just learned that.=0AI found no documenta= tion of this behavior, did I miss it?=0AIn particular, the javadoc of the w= orkflow of Filter doesn't mention transform() at all.=0AWould it make sense= to apply transform() only if the return code for filterKeyValue() includes= the KeyValue?=0A=0AC.=0A=0A-- Lars=0A>=0A>=0A>----- Original Message -----= =0A>From: Christophe Taton =0A>To: user@hbase.apache.or= g=0A>Cc:=0A>Sent: Sunday, June 30, 2013 10:26 PM=0A>Subject: Re: Behavior o= f Filter.transform() in FilterList?=0A>=0A>On Sun, Jun 30, 2013 at 10:15 PM= , Ted Yu wrote:=0A>=0A>> The clause 'family=3DX and c= olumn=3DY and KeyOnlyFilter' would be represented=0A>> by a FilterList, rig= ht ?=0A>> (family=3DA and colymn=3DB) would be represented by another Filte= rList.=0A>>=0A>=0A>Yes, that would be FilterList(OR, [FilterList(AND, [fami= ly=3DX, column=3DY,=0A>KeyOnlyFilter]), FilterList(AND, [family=3DA, column= =3DB])]).=0A>=0A>So the behavior is expected.=0A>>=0A>=0A>Could you explain= , I'm not sure how you reach this conclusion.=0A>Are you saying it is expec= ted, given the actual implementation=0A>FilterList.transform()?=0A>Or are t= here some other details I missed?=0A>=0A>Thanks!=0A>C.=0A>=0A>On Mon, Jul 1= , 2013 at 1:10 PM, Christophe Taton wrote:=0A>>=0A>> >= Hi,=0A>> >=0A>> > From=0A>> >=0A>> >=0A>> https://github.com/apache/hbase/= blob/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterL= ist.java#L183=0A>> > ,=0A>> > it appears that Filter.transform() is invoked= unconditionally on all=0A>> > filters in a FilterList hierarchy.=0A>> >=0A= >> > This is quite confusing, especially since I may construct a filter lik= e:=0A>> >=A0 =A0 =A0(family=3DX and column=3DY and KeyOnlyFilter) or (famil= y=3DA and colymn=3DB)=0A>> > The KeyOnlyFilter will remove all values from = the KeyValues in A:B as=0A>> well.=0A>> >=0A>> > Is my understanding correc= t? Is this an expected/intended behavior?=0A>> >=0A>> > Thanks,=0A>> > C.= =0A>> >=0A>>=0A>=0A> ---1172831624-845832186-1372705264=:79838--