public class TestFiltersWithBinaryComponentComparator extends Object
Modifier and Type | Field and Description |
---|---|
private int |
aOffset |
private int |
bOffset |
static HBaseClassTestRule |
CLASS_RULE
See https://issues.apache.org/jira/browse/HBASE-22969 - for need of BinaryComponentComparator
The descrption on jira should also help you in understanding tests implemented in this class
|
private int |
cOffset |
private int |
dOffset |
private byte[] |
family |
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
private byte[] |
qf |
private org.apache.hadoop.hbase.TableName |
tableName |
private static HBaseTestingUtility |
TEST_UTIL |
Constructor and Description |
---|
TestFiltersWithBinaryComponentComparator() |
Modifier and Type | Method and Description |
---|---|
private org.apache.hadoop.hbase.client.Scan |
createScan(org.apache.hadoop.hbase.filter.FilterList list) |
private void |
generateRows(org.apache.hadoop.hbase.client.Table ht,
byte[] family,
byte[] qf)
Since we are trying to emulate
SQL: SELECT * from table where a = 1 and b > 10 and b < 20 and
c > 90 and c < 100 and d = 1
We are generating rows with:
a = 1, b >=9 and b < 22, c >= 89 and c < 102, and d = 1
At the end the table will look something like this:
------------
a| b| c|d|
------------
1| 9| 89|1|family:qf|xyz|
-----------
1| 9| 90|1|family:qf|abc|
-----------
1| 9| 91|1|family:qf|xyz|
-------------------------
.
|
private List<org.apache.hadoop.hbase.Cell> |
getResults(org.apache.hadoop.hbase.client.Table ht,
org.apache.hadoop.hbase.client.Scan scan) |
private void |
setRowFilters(org.apache.hadoop.hbase.filter.FilterList filterList) |
static void |
setUpBeforeClass() |
private void |
setValueFilters(org.apache.hadoop.hbase.filter.FilterList filterList)
We have rows with either "abc" or "xyz".
|
static void |
tearDownAfterClass() |
void |
testRowAndValueFilterWithBinaryComponentComparator() |
void |
testRowFilterWithBinaryComponentComparator() |
void |
testValueFilterWithBinaryComponentComparator() |
public static final HBaseClassTestRule CLASS_RULE
private static final HBaseTestingUtility TEST_UTIL
private static final org.slf4j.Logger LOG
private byte[] family
private byte[] qf
private org.apache.hadoop.hbase.TableName tableName
private int aOffset
private int bOffset
private int cOffset
private int dOffset
public org.junit.rules.TestName name
public TestFiltersWithBinaryComponentComparator()
public static void setUpBeforeClass() throws Exception
Exception
public static void tearDownAfterClass() throws Exception
Exception
public void testRowFilterWithBinaryComponentComparator() throws IOException
IOException
public void testValueFilterWithBinaryComponentComparator() throws IOException
IOException
public void testRowAndValueFilterWithBinaryComponentComparator() throws IOException
IOException
private void generateRows(org.apache.hadoop.hbase.client.Table ht, byte[] family, byte[] qf) throws IOException
IOException
private void setRowFilters(org.apache.hadoop.hbase.filter.FilterList filterList)
private void setValueFilters(org.apache.hadoop.hbase.filter.FilterList filterList)
private org.apache.hadoop.hbase.client.Scan createScan(org.apache.hadoop.hbase.filter.FilterList list)
private List<org.apache.hadoop.hbase.Cell> getResults(org.apache.hadoop.hbase.client.Table ht, org.apache.hadoop.hbase.client.Scan scan) throws IOException
IOException
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.