Package org.apache.hadoop.hbase.client
Class TestRegionLocatorPagedScanRpcCount
java.lang.Object
org.apache.hadoop.hbase.client.TestRegionLocatorPagedScanRpcCount
Asserts the single-RPC promise of the paginated meta-scan path
(
ClientMetaTableAccessor.getTableHRegionLocations(AsyncTable, TableName, byte[], int)) by
wrapping the meta AsyncTable so we can count AdvancedScanResultConsumer.onNext(org.apache.hadoop.hbase.client.Result[], org.apache.hadoop.hbase.client.AdvancedScanResultConsumer.ScanController)
invocations - one per ScannerNext server response.
Cluster runs with hbase.meta.scanner.caching = 2 so the limit > caching branch is
exercised cheaply with a small table (5 user regions).-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static org.apache.hadoop.hbase.client.AsyncConnectionprivate static final byte[]private static final intCaching is small enough thatlimit > META_CACHINGis easy to set up.private static final intprivate static final org.apache.hadoop.hbase.TableNameprivate static final HBaseTestingUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intrunPagedScanAndCountRpcs(int limit) static voidsetUp()static voidtearDown()voidvoidvoidprivate static org.apache.hadoop.hbase.client.AsyncTable<org.apache.hadoop.hbase.client.AdvancedScanResultConsumer>wrapMetaTable(AtomicInteger onNextCalls) Returns a delegating proxy for the metaAsyncTablethat interceptsscan(Scan, AdvancedScanResultConsumer)and wraps the supplied consumer so everyAdvancedScanResultConsumer.onNext(org.apache.hadoop.hbase.client.Result[], org.apache.hadoop.hbase.client.AdvancedScanResultConsumer.ScanController)invocation incrementsonNextCalls.
-
Field Details
-
CLASS_RULE
-
UTIL
-
TABLE_NAME
-
FAMILY
-
META_CACHING
Caching is small enough thatlimit > META_CACHINGis easy to set up.- See Also:
-
NUM_REGIONS
- See Also:
-
CONN
-
-
Constructor Details
-
TestRegionLocatorPagedScanRpcCount
public TestRegionLocatorPagedScanRpcCount()
-
-
Method Details
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
testSingleRpcWhenLimitWithinCaching
- Throws:
Exception
-
testSingleRpcWhenLimitExceedsCaching
- Throws:
Exception
-
testUnboundedPathStillUsesConfiguredCaching
- Throws:
Exception
-
runPagedScanAndCountRpcs
- Throws:
Exception
-
wrapMetaTable
private static org.apache.hadoop.hbase.client.AsyncTable<org.apache.hadoop.hbase.client.AdvancedScanResultConsumer> wrapMetaTable(AtomicInteger onNextCalls) Returns a delegating proxy for the metaAsyncTablethat interceptsscan(Scan, AdvancedScanResultConsumer)and wraps the supplied consumer so everyAdvancedScanResultConsumer.onNext(org.apache.hadoop.hbase.client.Result[], org.apache.hadoop.hbase.client.AdvancedScanResultConsumer.ScanController)invocation incrementsonNextCalls.
-