[ 
https://issues.apache.org/jira/browse/HBASE-4176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13081400#comment-13081400
 ] 

stack commented on HBASE-4176:
------------------------------

Could we use this mini-language in the shell building filters?

Are you changing meaning of LESS_OR_EQUAL, GREATER, etc. in compare filter?

Misspelling: getDropDepenedentColumn() {

Some odd formatting issue here:

{code}
246     
  public static final byte [] regexStringType = new byte [] 
{'r','e','g','e','x',
247     
                                                                                
                                         's','t','r','i','n','g'};
{code}

You probably want to fix this ' 
 * https://our.intern.facebook.com/intern/wiki/index.php/HBase/Filter_Language'

Can we do other than this?

{code}
64      
    filterHashMap = new HashMap<ByteBuffer, Filter>();
65      
    registerFilter("KeyOnlyFilter", new KeyOnlyFilter());
66      
    registerFilter("FirstKeyOnlyFilter", new FirstKeyOnlyFilter());
67      
    registerFilter("PrefixFilter", new PrefixFilter());
68      
    registerFilter("ColumnPrefixFilter", new ColumnPrefixFilter());
69      
    registerFilter("MultipleColumnPrefixFilter", new 
MultipleColumnPrefixFilter());
70      
    registerFilter("ColumnCountGetFilter", new ColumnCountGetFilter());
71      
    registerFilter("PageFilter", new PageFilter());
72      
    registerFilter("ColumnPaginationFilter", new ColumnPaginationFilter());
73      
    registerFilter("InclusiveStopFilter", new InclusiveStopFilter());
74      
    registerFilter("TimestampsFilter", new TimestampsFilter());
75      
    registerFilter("RowFilter", new RowFilter());
76      
    registerFilter("FamilyFilter", new FamilyFilter());
77      
    registerFilter("QualifierFilter", new QualifierFilter());
78      
    registerFilter("ValueFilter", new ValueFilter());
79      
    registerFilter("ColumnRangeFilter", new ColumnRangeFilter());
80      
    registerFilter("SingleColumnValueFilter", new SingleColumnValueFilter());
81      
    registerFilter("SingleColumnValueExcludeFilter", new 
SingleColumnValueExcludeFilter());
82      
    registerFilter("DependentColumnFilter", new DependentColumnFilter());
{code}

Ask around.  I will too.  IIRC, you can't get a listing of classes under a dir 
on CLASSPATH so maybe there is nothing to do here and you have to explicitly 
list those filters you can build from String.  We can commit as is but would be 
cool if could figure alternative to hardcoding.

I did not review your parser.  A skim says its looking good.

Test looks good too.

Sorry I didn't put my comments up in reviewboard.  I was half way through when 
I realized I was doing this dumb filling comments into the issue.

Good stuff.



> Exposing HBase Filters to the Thrift API
> ----------------------------------------
>
>                 Key: HBASE-4176
>                 URL: https://issues.apache.org/jira/browse/HBASE-4176
>             Project: HBase
>          Issue Type: Improvement
>          Components: thrift
>            Reporter: Anirudh Todi
>            Assignee: Anirudh Todi
>            Priority: Minor
>         Attachments: Filter Language.docx, HBASE-4176.patch
>
>
> Currently, to use any of the filters, one has to explicitly add a scanner for 
> the filter in the Thrift API making it messy and long. With this patch, I am 
> trying to add support for all the filters in a clean way. The user specifies 
> a filter via a string. The string is parsed on the server to construct the 
> filter. More information can be found in the attached document named Filter 
> Language
> This patch is trying to extend and further the progress made by the patches 
> in the HBASE-1744 JIRA (https://issues.apache.org/jira/browse/HBASE-1744)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to