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

Ted Yu commented on HBASE-4612:
-------------------------------

As far as HBASE-4176 is concerned, take a look at this in TRUNK:
{code}
  public static Filter createFilterFromArguments(ArrayList<byte []> 
filterArguments) {
    Preconditions.checkArgument(filterArguments.size() == 1,
                                "Expected 1 but got: %s", 
filterArguments.size());
    byte [] columnPrefix = 
ParseFilter.removeQuotesFromByteArray(filterArguments.get(0));
    return new ColumnPrefixFilter(columnPrefix);
  }
{code}
You can relax the check above and call filterArguments.toArray() so that the 
new ctor can be used.
                
> Allow ColumnPrefixFilter to support multiple prefixes
> -----------------------------------------------------
>
>                 Key: HBASE-4612
>                 URL: https://issues.apache.org/jira/browse/HBASE-4612
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>    Affects Versions: 0.90.4
>            Reporter: Eran Kutner
>            Assignee: Eran Kutner
>            Priority: Minor
>             Fix For: 0.94.0
>
>         Attachments: HBASE-4612-0.90.patch
>
>
> When having a lot of columns grouped by name I've found that it would be very 
> useful to be able to scan them using multiple prefixes, allowing to fetch 
> specific groups in one scan, without fetching the entire row. This is 
> impossible to achieve using a FilterList, so I've added such support to the 
> existing ColmnPrefixFilter while keeping backward compatibility.
> The attached patch is based on 0.90.4, I noticed that the 0.92 branch has a 
> new method to support instantiating filters using Thrift. I'm not sure how 
> the serialization works there so I didn't implement that, but the rest of my 
> code should work in 0.92 as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to