Package org.apache.hadoop.hbase.filter
Class TestFuzzyRowFilter
java.lang.Object
org.apache.hadoop.hbase.filter.TestFuzzyRowFilter
@Tag("org.apache.hadoop.hbase.testclassification.FilterTests") @Tag("org.apache.hadoop.hbase.testclassification.SmallTests")
public class TestFuzzyRowFilter
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidassertNext(boolean reverse, byte[] fuzzyRow, byte[] mask, byte[] current, byte[] expected) private static voidprivate static org.apache.hadoop.hbase.filter.FuzzyRowFiltervoidTwo filters built from the same rule (distinct array instances) must be equal and hash equally, i.e.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidSerializing a filter must not leak the internal mask encoding.
-
Constructor Details
-
TestFuzzyRowFilter
public TestFuzzyRowFilter()
-
-
Method Details
-
testSatisfiesNoUnsafeForward
-
testSatisfiesForward
-
testSatisfiesReverse
-
testSatisfiesNoUnsafeReverse
-
testGetNextForFuzzyRuleForward
-
testGetNextForFuzzyRuleReverse
-
testGetNextForFuzzyRuleReverseCanReturnCurrentRow
-
assertNext
private static void assertNext(boolean reverse, byte[] fuzzyRow, byte[] mask, byte[] current, byte[] expected) -
testReverseFilterCellSkipsSameRowHint
-
testReverseFilterListSkipsSameRowFuzzyHint
- Throws:
IOException
-
testSerializationAfterFilterCellPreservesBehavior
Serializing a filter must not leak the internal mask encoding. On the unsafe path the stored mask is {-1 (fixed), 0 (non-fixed)};toByteArraymust emit the public constructor {0, 1} form so the round-tripped filter behaves identically (otherwise the leaked {-1, 0} is reparsed as an all-fixed mask). Processing a cell first must not change this.- Throws:
Exception
-
testEqualsConsistentAfterFilterCell
Two filters built from the same rule (distinct array instances) must be equal and hash equally, i.e.equals/hashCodemust be content-based, not identity-based, and consistent with each other and with the serialized ({0, 1}) form. This must also hold after one of them has processed a cell. -
newReverseFuzzyRowFilter
-
assertRow
-