Package org.apache.hadoop.hbase.filter
Class TestFilter
java.lang.Object
org.apache.hadoop.hbase.filter.TestFilter
Test filters at the HRegion doorstep.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classThe following filter simulates a pre-0.96 filter where filterRow() is defined while hasFilterRow() returns falsestatic classFilter which makes sleeps for a second between each row of a scan. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate longprivate static final byte[][]private static final byte[][]private static final org.slf4j.Loggerorg.junit.rules.TestName(package private) byte[][]private longprivate static final byte[][]private static final byte[][]private static final byte[][]private static final byte[][]private static final byte[][]private org.apache.hadoop.hbase.regionserver.HRegionprivate static final byte[][]private static final byte[][]private static final byte[][]private static final byte[][]private static final HBaseTestingUtilprivate static final byte[][] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetUp()voidtearDown()voidThe following test is to ensure old(such as hbase0.94) filterRow() can be correctly fired in 0.96+ code base.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidTests the theWhileMatchFilterworks in combination with aFilterthat uses theFilter.filterCell(Cell)method.voidTests the theWhileMatchFilterworks in combination with aFilterthat uses theFilter.filterRow()method.voidTests the theWhileMatchFilterworks in combination with aFilterthat uses theFilter.filterRowKey(Cell)method.voidvoidprivate voidverifyScan(org.apache.hadoop.hbase.client.Scan s, long expectedRows, long expectedKeys) private voidverifyScanFull(org.apache.hadoop.hbase.client.Scan s, org.apache.hadoop.hbase.KeyValue[] kvs) private voidverifyScanFullNoValues(org.apache.hadoop.hbase.client.Scan s, org.apache.hadoop.hbase.KeyValue[] kvs, boolean useLen) private voidverifyScanNoEarlyOut(org.apache.hadoop.hbase.client.Scan s, long expectedRows, long expectedKeys)
-
Field Details
-
CLASS_RULE
-
LOG
-
region
-
TEST_UTIL
-
name
-
ROWS_ONE
-
ROWS_TWO
-
ROWS_THREE
-
ROWS_FOUR
-
FAMILIES
-
FAMILIES_1
-
QUALIFIERS_ONE
-
QUALIFIERS_TWO
-
QUALIFIERS_THREE
-
QUALIFIERS_FOUR
-
QUALIFIERS_FIVE
-
VALUES
-
NEW_FAMILIES
byte[][] NEW_FAMILIES -
numRows
-
colsPerRow
-
-
Constructor Details
-
TestFilter
public TestFilter()
-
-
Method Details
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
testRegionScannerReseek
- Throws:
Exception
-
testNoFilter
- Throws:
Exception
-
testPrefixFilter
- Throws:
Exception
-
testPrefixFilterWithReverseScan
- Throws:
Exception
-
testPageFilter
- Throws:
Exception
-
testPageFilterWithReverseScan
- Throws:
Exception
-
testWhileMatchFilterWithFilterRowWithReverseScan
- Throws:
Exception
-
testWhileMatchFilterWithFilterRowKeyWithReverseScan
- Throws:
Exception
-
testWhileMatchFilterWithFilterRow
Tests the theWhileMatchFilterworks in combination with aFilterthat uses theFilter.filterRow()method. See HBASE-2258.- Throws:
Exception
-
test94FilterRowCompatibility
The following test is to ensure old(such as hbase0.94) filterRow() can be correctly fired in 0.96+ code base. See HBASE-10366- Throws:
Exception
-
testWhileMatchFilterWithFilterRowKey
Tests the theWhileMatchFilterworks in combination with aFilterthat uses theFilter.filterRowKey(Cell)method. See HBASE-2258.- Throws:
Exception
-
testWhileMatchFilterWithFilterCell
Tests the theWhileMatchFilterworks in combination with aFilterthat uses theFilter.filterCell(Cell)method. See HBASE-2258.- Throws:
Exception
-
testInclusiveStopFilter
- Throws:
IOException
-
testInclusiveStopFilterWithReverseScan
- Throws:
IOException
-
testQualifierFilter
- Throws:
IOException
-
testFamilyFilter
- Throws:
IOException
-
testRowFilter
- Throws:
IOException
-
testValueFilter
- Throws:
IOException
-
testSkipFilter
- Throws:
IOException
-
testFilterList
- Throws:
IOException
-
testFirstKeyOnlyFilter
- Throws:
IOException
-
testFilterListWithSingleColumnValueFilter
- Throws:
IOException
-
testFilterListWithPrefixFilter
- Throws:
IOException
-
testSingleColumnValueFilter
- Throws:
IOException
-
testColumnValueFilter
- Throws:
Exception
-
verifyScan
private void verifyScan(org.apache.hadoop.hbase.client.Scan s, long expectedRows, long expectedKeys) throws IOException - Throws:
IOException
-
verifyScanNoEarlyOut
private void verifyScanNoEarlyOut(org.apache.hadoop.hbase.client.Scan s, long expectedRows, long expectedKeys) throws IOException - Throws:
IOException
-
verifyScanFull
private void verifyScanFull(org.apache.hadoop.hbase.client.Scan s, org.apache.hadoop.hbase.KeyValue[] kvs) throws IOException - Throws:
IOException
-
verifyScanFullNoValues
private void verifyScanFullNoValues(org.apache.hadoop.hbase.client.Scan s, org.apache.hadoop.hbase.KeyValue[] kvs, boolean useLen) throws IOException - Throws:
IOException
-
testColumnPaginationFilterColumnOffset
- Throws:
Exception
-
testLatestVersionFilterWithExplicitColumn
- Throws:
Exception
-
testColumnPaginationFilter
- Throws:
Exception
-
testKeyOnlyFilter
- Throws:
Exception
-
testNestedFilterListWithSCVF
- Throws:
IOException
-