Package org.apache.hadoop.hbase.client
Class TestClientScannerTimeouts
java.lang.Object
org.apache.hadoop.hbase.client.TestClientScannerTimeouts
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
private static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate static org.apache.hadoop.hbase.client.AsyncConnection
private static org.apache.hadoop.hbase.client.AsyncTable<org.apache.hadoop.hbase.client.AdvancedScanResultConsumer>
static final HBaseClassTestRule
private static final int
private static org.apache.hadoop.hbase.client.Connection
private static final byte[]
private static final org.slf4j.Logger
private static final int
org.junit.rules.TestName
private static final byte[]
private static final byte[]
private static final byte[]
private static final byte[]
private static final byte[]
private static final int
private static final int
private static org.apache.hadoop.hbase.client.Table
private static final HBaseTestingUtil
private static final byte[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
expectNumTries
(int expected) private void
expectRetryOutOfOrderScannerNext
(Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) private void
expectRow
(byte[] expected, org.apache.hadoop.hbase.client.Result result) private void
expectTimeout
(long start, int timeout) private void
expectTimeoutOnNext
(int timeout, Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) private void
expectTimeoutOnOpenScanner
(int timeout, Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) private org.apache.hadoop.hbase.client.ResultScanner
private org.apache.hadoop.hbase.client.ResultScanner
private void
putToTable
(org.apache.hadoop.hbase.client.Table ht, byte[] rowkey) void
setup
(boolean isSystemTable) static void
static void
void
verify that we honorConnectionConfiguration.HBASE_CLIENT_META_SCANNER_TIMEOUT
for next() calls in meta scansvoid
AsyncTable version of abovevoid
verify that we honorConnectionConfiguration.HBASE_CLIENT_META_READ_RPC_TIMEOUT_KEY
for openScanner() calls for meta scansvoid
AsyncTable version of abovevoid
verify that we honor theHConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD
for normal scans.void
AsyncTable version of abovevoid
verify that we honorHConstants.HBASE_RPC_READ_TIMEOUT_KEY
for openScanner() calls for meta scansvoid
AsyncTable version of abovevoid
verify that we don't miss any data when encountering an OutOfOrderScannerNextException.void
AsyncTable version of above
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
ASYNC_CONN
-
CONN
-
FAMILY
-
QUALIFIER
-
VALUE
-
ROW0
-
ROW1
-
ROW2
-
ROW3
-
rpcTimeout
- See Also:
-
scanTimeout
- See Also:
-
metaScanTimeout
- See Also:
-
CLIENT_RETRIES_NUMBER
- See Also:
-
table
-
asyncTable
private static org.apache.hadoop.hbase.client.AsyncTable<org.apache.hadoop.hbase.client.AdvancedScanResultConsumer> asyncTable -
name
-
-
Constructor Details
-
TestClientScannerTimeouts
public TestClientScannerTimeouts()
-
-
Method Details
-
setUpBeforeClass
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
setup
- Throws:
IOException
-
expectRow
-
expectNumTries
-
testRetryOutOfOrderScannerNextException
verify that we don't miss any data when encountering an OutOfOrderScannerNextException. Typically, the only way to naturally trigger this is if a client-side timeout causes an erroneous next() call. This is relatively hard to do these days because the server attempts to always return before the timeout. In this test we force the server to throw this exception, so that we can test the retry logic appropriately.- Throws:
IOException
-
testRetryOutOfOrderScannerNextExceptionAsync
AsyncTable version of above- Throws:
IOException
-
testNormalScanTimeoutOnNext
verify that we honor theHConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD
for normal scans.- Throws:
IOException
-
testNormalScanTimeoutOnNextAsync
AsyncTable version of above- Throws:
IOException
-
testNormalScanTimeoutOnOpenScanner
verify that we honorHConstants.HBASE_RPC_READ_TIMEOUT_KEY
for openScanner() calls for meta scans- Throws:
IOException
-
testNormalScanTimeoutOnOpenScannerAsync
AsyncTable version of above- Throws:
IOException
-
testMetaScanTimeoutOnNext
verify that we honorConnectionConfiguration.HBASE_CLIENT_META_SCANNER_TIMEOUT
for next() calls in meta scans- Throws:
IOException
-
testMetaScanTimeoutOnNextAsync
AsyncTable version of above- Throws:
IOException
-
testMetaScanTimeoutOnOpenScanner
verify that we honorConnectionConfiguration.HBASE_CLIENT_META_READ_RPC_TIMEOUT_KEY
for openScanner() calls for meta scans- Throws:
IOException
-
testMetaScanTimeoutOnOpenScannerAsync
AsyncTable version of above- Throws:
IOException
-
expectRetryOutOfOrderScannerNext
private void expectRetryOutOfOrderScannerNext(Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) throws IOException - Throws:
IOException
-
expectTimeoutOnNext
private void expectTimeoutOnNext(int timeout, Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) throws IOException - Throws:
IOException
-
expectTimeoutOnOpenScanner
private void expectTimeoutOnOpenScanner(int timeout, Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) throws IOException - Throws:
IOException
-
expectTimeout
-
getScanner
-
getAsyncScanner
-
putToTable
- Throws:
IOException
-