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
Modifier and TypeClassDescription(package private) static class
The following filter simulates a pre-0.96 filter where filterRow() is defined while hasFilterRow() returns falsestatic class
Filter which makes sleeps for a second between each row of a scan. -
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private long
private static final byte[][]
private static final byte[][]
private static final org.slf4j.Logger
org.junit.rules.TestName
(package private) byte[][]
private long
private 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.HRegion
private static final byte[][]
private static final byte[][]
private static final byte[][]
private static final byte[][]
private static final HBaseTestingUtil
private static final byte[][]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setUp()
void
tearDown()
void
The following test is to ensure old(such as hbase0.94) filterRow() can be correctly fired in 0.96+ code base.void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
Tests the theWhileMatchFilter
works in combination with aFilter
that uses theFilter.filterCell(Cell)
method.void
Tests the theWhileMatchFilter
works in combination with aFilter
that uses theFilter.filterRow()
method.void
Tests the theWhileMatchFilter
works in combination with aFilter
that uses theFilter.filterRowKey(Cell)
method.void
void
private void
verifyScan
(org.apache.hadoop.hbase.client.Scan s, long expectedRows, long expectedKeys) private void
verifyScanFull
(org.apache.hadoop.hbase.client.Scan s, org.apache.hadoop.hbase.KeyValue[] kvs) private void
verifyScanFullNoValues
(org.apache.hadoop.hbase.client.Scan s, org.apache.hadoop.hbase.KeyValue[] kvs, boolean useLen) private void
verifyScanNoEarlyOut
(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 theWhileMatchFilter
works in combination with aFilter
that 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 theWhileMatchFilter
works in combination with aFilter
that uses theFilter.filterRowKey(Cell)
method. See HBASE-2258.- Throws:
Exception
-
testWhileMatchFilterWithFilterCell
Tests the theWhileMatchFilter
works in combination with aFilter
that 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
-