Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2B0C1200B34 for ; Sat, 18 Jun 2016 03:44:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 29CBA160A63; Sat, 18 Jun 2016 01:44:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7336F160A61 for ; Sat, 18 Jun 2016 03:44:08 +0200 (CEST) Received: (qmail 24810 invoked by uid 500); 18 Jun 2016 01:44:06 -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 24186 invoked by uid 99); 18 Jun 2016 01:44:06 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Jun 2016 01:44:06 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id EA92B2C14F9 for ; Sat, 18 Jun 2016 01:44:05 +0000 (UTC) Date: Sat, 18 Jun 2016 01:44:05 +0000 (UTC) From: "Mikhail Antonov (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (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 archived-at: Sat, 18 Jun 2016 01:44:09 -0000 [ https://issues.apache.org/jira/browse/HBASE-7115?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1533= 7417#comment-15337417 ]=20 Mikhail Antonov commented on HBASE-7115: ---------------------------------------- bumping to 1.4. any progress here? > [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: 2.0.0, 1.4.0 > > Attachments: HBASE-7115_trunk.patch, HBASE-7115_trunk.patch, HBAS= E-7115_trunk_v2.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 was sent by Atlassian JIRA (v6.3.4#6332)