Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9F09B1051F for ; Fri, 3 May 2013 19:10:16 +0000 (UTC) Received: (qmail 91200 invoked by uid 500); 3 May 2013 19:10:16 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 91035 invoked by uid 500); 3 May 2013 19:10:16 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 91025 invoked by uid 99); 3 May 2013 19:10:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 May 2013 19:10:16 +0000 Date: Fri, 3 May 2013 19:10:16 +0000 (UTC) From: "Aditya Kishore (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-7115) [shell] Provide a way to register custom filters with the Filter Language Parser MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-7115?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Aditya Kishore updated HBASE-7115: ---------------------------------- Status: Patch Available (was: Open) The test failure is unrelated and seems to be related to what is fixed in H= BASE-8469. The test ran fine on my machine with updated code. Resubmitting the patch. =20 > [shell] Provide a way to register custom filters with the Filter Language= Parser > -------------------------------------------------------------------------= ------- > > Key: HBASE-7115 > URL: https://issues.apache.org/jira/browse/HBASE-7115 > Project: HBase > Issue Type: Improvement > Components: Filters, shell > Affects Versions: 0.95.2 > Reporter: Aditya Kishore > Assignee: Aditya Kishore > Fix For: 0.95.2 > > Attachments: HBASE-7115_trunk.patch, HBASE-7115_trunk.patch > > > HBASE-5428 added this capability to thrift interface but the configuratio= n parameter name is "thrift" specific. > This patch introduces a more generic parameter "hbase.user.filters" using= which the user defined custom filters can be specified in the configuratio= n and loaded in any client that needs to use the filter language parser. > The patch then uses this new parameter to register any user specified fil= ters while invoking the HBase shell. > Example usage: Let's say I have written a couple of custom filters with c= lass names *{{org.apache.hadoop.hbase.filter.custom.SuperDuperFilter}}* and= *{{org.apache.hadoop.hbase.filter.custom.SilverBulletFilter}}* and I want = to use them from HBase shell using the filter language. > To do that, I would add the following configuration to {{hbase-site.xml}} > {panel}{{}} > {{=C2=A0=C2=A0hbase.user.filters}} > {{=C2=A0=C2=A0}}*{{SuperDuperFilter}}*{{:org.apache.hadoop.hbase.f= ilter.custom.SuperDuperFilter,}}*{{SilverBulletFilter}}*{{:org.apache.hadoo= p.hbase.filter.custom.SilverBulletFilter}} > {{}}{panel} > Once this is configured, I can launch HBase shell and use these filters i= n my {{get}} or {{scan}} just the way I would use a built-in filter. > {code} > hbase(main):001:0> scan 't', {FILTER =3D> "SuperDuperFilter(true) AND Sil= verBulletFilter(42)"} > ROW COLUMN+CELL > status column=3Dcf:= a, timestamp=3D304385520000, value=3Dworld_peace > 1 row(s) in 0.0000 seconds > {code} > To use this feature in any client, the client needs to make the following= function call as part of its initialization. > {code} > ParseFilter.registerUserFilters(configuration); > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira