Search in sources :

Example 1 with FirstKeyValueMatchingQualifiersFilter

use of org.apache.hadoop.hbase.filter.FirstKeyValueMatchingQualifiersFilter in project hbase by apache.

the class TestPartialResultsFromClientSide method testPartialResultsWithColumnFilter.

/**
   * Test partial Result re-assembly in the presence of different filters. The Results from the
   * partial scanner should match the Results returned from a scanner that receives all of the
   * results in one RPC to the server. The partial scanner is tested with a variety of different
   * result sizes (all of which are less than the size necessary to fetch an entire row)
   * @throws Exception
   */
@Test
public void testPartialResultsWithColumnFilter() throws Exception {
    testPartialResultsWithColumnFilter(new FirstKeyOnlyFilter());
    testPartialResultsWithColumnFilter(new ColumnPrefixFilter(Bytes.toBytes("testQualifier5")));
    testPartialResultsWithColumnFilter(new ColumnRangeFilter(Bytes.toBytes("testQualifer1"), true, Bytes.toBytes("testQualifier7"), true));
    Set<byte[]> qualifiers = new LinkedHashSet<>();
    qualifiers.add(Bytes.toBytes("testQualifier5"));
    testPartialResultsWithColumnFilter(new FirstKeyValueMatchingQualifiersFilter(qualifiers));
}
Also used : ColumnPrefixFilter(org.apache.hadoop.hbase.filter.ColumnPrefixFilter) LinkedHashSet(java.util.LinkedHashSet) FirstKeyOnlyFilter(org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter) ColumnRangeFilter(org.apache.hadoop.hbase.filter.ColumnRangeFilter) FirstKeyValueMatchingQualifiersFilter(org.apache.hadoop.hbase.filter.FirstKeyValueMatchingQualifiersFilter) Test(org.junit.Test)

Aggregations

LinkedHashSet (java.util.LinkedHashSet)1 ColumnPrefixFilter (org.apache.hadoop.hbase.filter.ColumnPrefixFilter)1 ColumnRangeFilter (org.apache.hadoop.hbase.filter.ColumnRangeFilter)1 FirstKeyOnlyFilter (org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter)1 FirstKeyValueMatchingQualifiersFilter (org.apache.hadoop.hbase.filter.FirstKeyValueMatchingQualifiersFilter)1 Test (org.junit.Test)1