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 957E2104F7 for ; Mon, 1 Jul 2013 17:28:18 +0000 (UTC) Received: (qmail 88457 invoked by uid 500); 1 Jul 2013 17:28:15 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 88228 invoked by uid 500); 1 Jul 2013 17:28:15 -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 88212 invoked by uid 99); 1 Jul 2013 17:28:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jul 2013 17:28:14 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of taton@wibidata.com designates 209.85.219.42 as permitted sender) Received: from [209.85.219.42] (HELO mail-oa0-f42.google.com) (209.85.219.42) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jul 2013 17:28:10 +0000 Received: by mail-oa0-f42.google.com with SMTP id j6so5290192oag.29 for ; Mon, 01 Jul 2013 10:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wibidata.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=jp0ekFHDy/us/P79NLTXX4nI3TWfH9Og+pqGitQFeUc=; b=NeH0HFniA1Jistn2zZ6UJ7kNafyoVF7Zu9bj8xWWvLe1xuLK23FCbMOsnfbnnV/3vl oicXi89bN1yzCxZn3K81KdKZeAIsKF14Llu5kktVc1nIPodq+8VQCNGrDH3ZApp+68WS y2QDIhkQBVV1VUEl6nLBuVJiHAt9w3V16e8ok= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=jp0ekFHDy/us/P79NLTXX4nI3TWfH9Og+pqGitQFeUc=; b=NTnAae4715vM0mNmPKwaja8GNWVeiQQxnTnNfNXa9SHopqACd/EnKGQDk3ERBjWRnb eCjDuOhBa1ZEuP6OABgNCo9eSAgHNWbOYCKxooDb4Rk0N0tybT5m1KTVqbslT5NP2boo FeqFj+AWn6f1RkV2n12RE8ER0pw8TN05l9VCB5PpgIXAdM8uXPs3riTa+wuJ3PKb5ZgB 3VIB4p8r5WXnodFKTDuKxR0JsB/17Bp75d99s0+/F2+uVr2zpD2srZNA/ylIul899zw6 Ei/oEs0iqrNNFGRzwgvkDte56jtQ41EwBk6FoC/YpvaFjLpSNanipcjZ9wvoHWdRMmIN skCQ== MIME-Version: 1.0 X-Received: by 10.60.54.232 with SMTP id m8mr10066772oep.35.1372699669247; Mon, 01 Jul 2013 10:27:49 -0700 (PDT) Received: by 10.60.0.161 with HTTP; Mon, 1 Jul 2013 10:27:49 -0700 (PDT) In-Reply-To: <1372677275.83181.YahooMailNeo@web140601.mail.bf1.yahoo.com> References: <1372677275.83181.YahooMailNeo@web140601.mail.bf1.yahoo.com> Date: Mon, 1 Jul 2013 10:27:49 -0700 Message-ID: Subject: Re: Behavior of Filter.transform() in FilterList? From: Christophe Taton To: user@hbase.apache.org, lars hofhansl Content-Type: multipart/alternative; boundary=089e0115ecf02b4c2704e0768c36 X-Gm-Message-State: ALoCoQk/KryPB72jQsuFqOwfzhszkHHyqP77egvao5IDu4WM78A9N5C1GiMKe/GEYOwk5LibT0hj X-Virus-Checked: Checked by ClamAV on apache.org --089e0115ecf02b4c2704e0768c36 Content-Type: text/plain; charset=UTF-8 On Mon, Jul 1, 2013 at 4:14 AM, lars hofhansl wrote: > You want transform to only be called on filters that are "reached"? > I.e. FilterA and FilterB, FilterB.transform should not be called if a KV > is already filtered by FilterA? > Yes, that's what I naively expected, at first. That's not how it works right now, transform is called in a completely > different code path from the actual filtering logic. > Indeed, I just learned that. I found no documentation of this behavior, did I miss it? In particular, the javadoc of the workflow of Filter doesn't mention transform() at all. Would it make sense to apply transform() only if the return code for filterKeyValue() includes the KeyValue? C. -- Lars > > ----- Original Message ----- > From: Christophe Taton > To: user@hbase.apache.org > Cc: > Sent: Sunday, June 30, 2013 10:26 PM > Subject: Re: Behavior of Filter.transform() in FilterList? > > On Sun, Jun 30, 2013 at 10:15 PM, Ted Yu wrote: > > > The clause 'family=X and column=Y and KeyOnlyFilter' would be represented > > by a FilterList, right ? > > (family=A and colymn=B) would be represented by another FilterList. > > > > Yes, that would be FilterList(OR, [FilterList(AND, [family=X, column=Y, > KeyOnlyFilter]), FilterList(AND, [family=A, column=B])]). > > So the behavior is expected. > > > > Could you explain, I'm not sure how you reach this conclusion. > Are you saying it is expected, given the actual implementation > FilterList.transform()? > Or are there some other details I missed? > > Thanks! > C. > > On Mon, Jul 1, 2013 at 1:10 PM, Christophe Taton > wrote: > > > > > Hi, > > > > > > From > > > > > > > > > https://github.com/apache/hbase/blob/0.95/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java#L183 > > > , > > > it appears that Filter.transform() is invoked unconditionally on all > > > filters in a FilterList hierarchy. > > > > > > This is quite confusing, especially since I may construct a filter > like: > > > (family=X and column=Y and KeyOnlyFilter) or (family=A and > colymn=B) > > > The KeyOnlyFilter will remove all values from the KeyValues in A:B as > > well. > > > > > > Is my understanding correct? Is this an expected/intended behavior? > > > > > > Thanks, > > > C. > > > > > > > --089e0115ecf02b4c2704e0768c36--