hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anoop Sam John (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HBASE-5951) Combining ColumnPrefixFilters using filterlist.
Date Fri, 11 May 2012 04:00:07 GMT

     [ https://issues.apache.org/jira/browse/HBASE-5951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Anoop Sam John resolved HBASE-5951.
-----------------------------------

    Resolution: Not A Problem

This is not a defect.. 2 ColumnPrefixFilters were used with AND condition and that is why
all the KVs were getting filtered out. For the usage scenario custom filter needs to be written.
Closing after the agreement from Davis
                
> Combining ColumnPrefixFilters using filterlist.
> -----------------------------------------------
>
>                 Key: HBASE-5951
>                 URL: https://issues.apache.org/jira/browse/HBASE-5951
>             Project: HBase
>          Issue Type: Bug
>          Components: filters
>    Affects Versions: 0.92.1
>         Environment: Combining multiple ColumnPrefixFilters using filterlist does not
return exact result.
>            Reporter: Davis Abraham
>
> FilterList listOfFilters = new FilterList (FilterList.Operator.MUST_PASS_ALL);
> FilterList listOfFilters1 = new FilterList (FilterList.Operator.MUST_PASS_ALL);
> FilterList listOfFilters2 = new FilterList (FilterList.Operator.MUST_PASS_ALL);
> SingleColumnValueFilter SingleFilter1 = new
> SingleColumnValueFilter(Bytes.toBytes("cf"),
> Bytes.toBytes("country"), CompareOp.EQUAL,
> Bytes.toBytes("USA"));
> listOfFilters.addFilter(SingleFilter1);
> ValueFilter VF1= new ValueFilter (CompareOp.EQUAL, 
> new SubstringComparator("ABC"));
> ColumnPrefixFilter CF1= new ColumnPrefixFilter(Bytes.toBytes("name"));
> listOfFilters1.addFilter(CF1);
> listOfFilters1.addFilter(VF1);
> listOfFilters.addFilter(listOfFilters1);
> ValueFilter VF2= new ValueFilter (CompareOp.EQUAL, 
> new SubstringComparator("ED"));
> ColumnPrefixFilter CF2= new ColumnPrefixFilter (Bytes.toBytes("CRS"));
> listOfFilters2.addFilter(CF2);
> listOfFilters2.addFilter(VF2);
> listOfFilters.addFilter(listOfFilters2);
> When i do a combibation of SingleFilter1 and listOfFilters1
>  the result is correct, same way the combination of 
> SingleFilter1 and listOfFilters2 is returing correct result.
> But when all the three is combined im not getting any result..
> Is it the problem with multiple ColumnPrefixFilter??? 
> Value "ABC" exist in name.0 and value "ED" exist in CRS.0 and it is in
> the same row under same Column Family.

--
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

        

Mime
View raw message