Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-7115

[shell] Provide a way to register custom filters with the Filter Language Parser



    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.95.2
    • Fix Version/s: None
    • Component/s: Filters, shell
    • Labels:


      HBASE-5428 added this capability to thrift interface but the configuration 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 configuration 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 filters while invoking the HBase shell.

      Example usage: Let's say I have written a couple of custom filters with class 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


      Once this is configured, I can launch HBase shell and use these filters in my get or scan just the way I would use a built-in filter.

      hbase(main):001:0> scan 't', {FILTER => "SuperDuperFilter(true) AND SilverBulletFilter(42)"}
      ROW                                                          COLUMN+CELL
       status                                                      column=cf:a, timestamp=304385520000, value=world_peace
      1 row(s) in 0.0000 seconds

      To use this feature in any client, the client needs to make the following function call as part of its initialization.



        1. HBASE-7115_trunk_v2.patch
          5 kB
          Aditya Kishore
        2. HBASE-7115_trunk.patch
          5 kB
          Aditya Kishore
        3. HBASE-7115_trunk.patch
          4 kB
          Aditya Kishore

          Issue Links



              • Assignee:
                adityakishore Aditya Kishore
                adityakishore Aditya Kishore
              • Votes:
                0 Vote for this issue
                8 Start watching this issue


                • Created: