hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kannan Muthukkaruppan (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-5126) AND (USING FilterList) of two ColumnPrefixFilters broken
Date Wed, 04 Jan 2012 23:25:39 GMT
AND (USING FilterList) of two ColumnPrefixFilters broken
--------------------------------------------------------

                 Key: HBASE-5126
                 URL: https://issues.apache.org/jira/browse/HBASE-5126
             Project: HBase
          Issue Type: Bug
            Reporter: Kannan Muthukkaruppan


[Notice this in 89 branch. Possibly an issue in trunk also.]

A test which does a columnPrefixFilter("tag0") AND columnPrefixFilter("tag1") should return
0 kvs; instead it returns kvs with prefix "tag0".

{code}
table = HTable.new(conf, tableName)

put = Put.new(Bytes.toBytes("row"))
put.add(cf1name, Bytes.toBytes("tag0"), Bytes.toBytes("value0"))
put.add(cf1name, Bytes.toBytes("tag1"), Bytes.toBytes("value1"))
put.add(cf1name, Bytes.toBytes("tag2"), Bytes.toBytes("value2"))

table.put(put)

# Test for AND Two Column Prefix Filters                                                 
                                                                                         
       
filter1 = ColumnPrefixFilter.new(Bytes.toBytes("tag0"));
filter2 = ColumnPrefixFilter.new(Bytes.toBytes("tag2"));

filters = FilterList.new(FilterList::Operator::MUST_PASS_ALL);
filters.addFilter(filter1);
filters.addFilter(filter1);

get = Get.new(Bytes.toBytes("row"))
get.setFilter(filters)
get.setMaxVersions();
keyValues = table.get(get).raw()

keyValues.each do |keyValue|
  puts "Key=#{Bytes.toStringBinary(keyValue.getQualifier())}; Value=#{Bytes.toStringBinary(keyValue.getValue())};
Timestamp=#{keyValue.getTimestamp()}" 
end
{code}

outputs:

{code}
Key=tag0; Value=value0; Timestamp=1325719223523
{code}


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