Package org.apache.hadoop.hbase.filter
Class TestFilterListHintDelegation
java.lang.Object
org.apache.hadoop.hbase.filter.TestFilterListHintDelegation
@Tag("org.apache.hadoop.hbase.testclassification.FilterTests") @Tag("org.apache.hadoop.hbase.testclassification.SmallTests")
public class TestFilterListHintDelegation
extends Object
Unit tests for
getHintForRejectedRow and getSkipHint delegation in composite
filters (FilterList, SkipFilter, WhileMatchFilter).-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static org.apache.hadoop.hbase.filter.FilterBasefixedRejectedRowHintFilter(org.apache.hadoop.hbase.Cell hint) Filter that returns a fixed hint fromgetHintForRejectedRowwithout overridingfilterRowKey.private static org.apache.hadoop.hbase.filter.FilterBasefixedSkipHintFilter(org.apache.hadoop.hbase.Cell hint) Filter that returns a fixed hint fromgetSkipHint.private static org.apache.hadoop.hbase.KeyValuekv(byte[] row) private static org.apache.hadoop.hbase.filter.FilterBaserejectingRowHintFilter(org.apache.hadoop.hbase.Cell hint) Filter that rejects every row viafilterRowKeyand returns a fixed hint.private static org.apache.hadoop.hbase.filter.FilterBaseterminatedFilter(org.apache.hadoop.hbase.Cell hint) Filter that claimsfilterAllRemaining() == true.voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoid
-
Field Details
-
ROW_A
-
ROW_B
-
ROW_C
-
FAMILY
-
QUALIFIER
-
-
Constructor Details
-
TestFilterListHintDelegation
public TestFilterListHintDelegation()
-
-
Method Details
-
kv
-
fixedRejectedRowHintFilter
private static org.apache.hadoop.hbase.filter.FilterBase fixedRejectedRowHintFilter(org.apache.hadoop.hbase.Cell hint) Filter that returns a fixed hint fromgetHintForRejectedRowwithout overridingfilterRowKey. Used in OR / SkipFilter / WhileMatchFilter tests where the AND per-sub-filter rejection tracking does not apply. -
rejectingRowHintFilter
private static org.apache.hadoop.hbase.filter.FilterBase rejectingRowHintFilter(org.apache.hadoop.hbase.Cell hint) Filter that rejects every row viafilterRowKeyand returns a fixed hint. Used in AND tests whereFilterListWithAND.getHintForRejectedRowrequires sub-filters to have individually rejected viafilterRowKeybefore being consulted. -
fixedSkipHintFilter
private static org.apache.hadoop.hbase.filter.FilterBase fixedSkipHintFilter(org.apache.hadoop.hbase.Cell hint) Filter that returns a fixed hint fromgetSkipHint. -
terminatedFilter
private static org.apache.hadoop.hbase.filter.FilterBase terminatedFilter(org.apache.hadoop.hbase.Cell hint) Filter that claimsfilterAllRemaining() == true. -
testANDGetHintForRejectedRow_takesMax
- Throws:
IOException
-
testANDGetHintForRejectedRow_ignoresNull
- Throws:
IOException
-
testANDGetHintForRejectedRow_allNull
- Throws:
IOException
-
testANDGetHintForRejectedRow_reversed
- Throws:
IOException
-
testANDGetSkipHint_takesMax
- Throws:
IOException
-
testANDGetSkipHint_ignoresNull
- Throws:
IOException
-
testANDGetSkipHint_allNull
- Throws:
IOException
-
testANDGetSkipHint_reversed
- Throws:
IOException
-
testORGetHintForRejectedRow_takesMin
- Throws:
IOException
-
testORGetHintForRejectedRow_nullReturnsNull
- Throws:
IOException
-
testORGetHintForRejectedRow_allHints
- Throws:
IOException
-
testORGetHintForRejectedRow_reversed
- Throws:
IOException
-
testORGetSkipHint_takesMin
- Throws:
IOException
-
testORGetSkipHint_nullReturnsNull
- Throws:
IOException
-
testORGetSkipHint_allHints
- Throws:
IOException
-
testORGetSkipHint_reversed
- Throws:
IOException
-
testFilterAllRemainingSubFilterSkippedForGetSkipHint
- Throws:
IOException
-
testORFilterAllRemainingSubFilterSkippedForGetHintForRejectedRow
@Test public void testORFilterAllRemainingSubFilterSkippedForGetHintForRejectedRow() throws IOException- Throws:
IOException
-
testORFilterAllRemainingSubFilterSkippedForGetSkipHint
- Throws:
IOException
-
testSkipFilterDelegatesGetHintForRejectedRow
- Throws:
IOException
-
testSkipFilterDelegatesGetSkipHint
- Throws:
IOException
-
testWhileMatchFilterDelegatesGetHintForRejectedRow
- Throws:
IOException
-
testWhileMatchFilterDelegatesGetSkipHint
- Throws:
IOException
-
testFilterListDelegatesToFilterListBase
- Throws:
IOException
-
testNestedFilterList
- Throws:
IOException
-
testFilterAllRemainingSubFilterSkipped
- Throws:
IOException
-
testORAllSubFiltersTerminated_getHintForRejectedRow
- Throws:
IOException
-
testORAllSubFiltersTerminated_getSkipHint
- Throws:
IOException
-
testANDAllSubFiltersTerminated_getHintForRejectedRow
- Throws:
IOException
-
testANDAllSubFiltersTerminated_getSkipHint
- Throws:
IOException
-
testEmptyFilterListReturnsNull
- Throws:
IOException
-
testSingleFilterAND
- Throws:
IOException
-
testSingleFilterOR
- Throws:
IOException
-
testANDGetHintForRejectedRow_onlyConsultsRejectingSubFilters
- Throws:
IOException
-
testANDGetHintForRejectedRow_resetClearsRejectionState
- Throws:
IOException
-
testANDGetHintForRejectedRow_takesMaxFromRejectingFilters
- Throws:
IOException
-
testANDGetHintForRejectedRow_reversedTakesMaxFromRejectingFilters
@Test public void testANDGetHintForRejectedRow_reversedTakesMaxFromRejectingFilters() throws IOException- Throws:
IOException
-