Package org.apache.hadoop.hbase.client
Class TestClientScannerTimeouts
java.lang.Object
org.apache.hadoop.hbase.client.TestClientScannerTimeouts
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static org.apache.hadoop.hbase.client.AsyncConnectionprivate static org.apache.hadoop.hbase.client.AsyncTable<org.apache.hadoop.hbase.client.AdvancedScanResultConsumer>static final HBaseClassTestRuleprivate static final intprivate static org.apache.hadoop.hbase.client.Connectionprivate static final byte[]private static final org.slf4j.Loggerprivate static final intorg.junit.rules.TestNameprivate static final byte[]private static final byte[]private static final byte[]private static final byte[]private static final byte[]private static final intprivate static final intprivate static org.apache.hadoop.hbase.client.Tableprivate static final HBaseTestingUtilprivate static final byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidexpectNumTries(int expected) private voidexpectRetryOutOfOrderScannerNext(Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) private voidexpectRow(byte[] expected, org.apache.hadoop.hbase.client.Result result) private voidexpectTimeout(long start, int timeout) private voidexpectTimeoutOnNext(int timeout, Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) private voidexpectTimeoutOnOpenScanner(int timeout, Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) private org.apache.hadoop.hbase.client.ResultScannerprivate org.apache.hadoop.hbase.client.ResultScannerprivate voidputToTable(org.apache.hadoop.hbase.client.Table ht, byte[] rowkey) voidsetup(boolean isSystemTable) static voidstatic voidvoidverify that we honorConnectionConfiguration.HBASE_CLIENT_META_SCANNER_TIMEOUTfor next() calls in meta scansvoidAsyncTable version of abovevoidverify that we honorConnectionConfiguration.HBASE_CLIENT_META_READ_RPC_TIMEOUT_KEYfor openScanner() calls for meta scansvoidAsyncTable version of abovevoidverify that we honor theHConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIODfor normal scans.voidAsyncTable version of abovevoidverify that we honorHConstants.HBASE_RPC_READ_TIMEOUT_KEYfor openScanner() calls for meta scansvoidAsyncTable version of abovevoidverify that we don't miss any data when encountering an OutOfOrderScannerNextException.voidAsyncTable 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_PERIODfor normal scans.- Throws:
IOException
-
testNormalScanTimeoutOnNextAsync
AsyncTable version of above- Throws:
IOException
-
testNormalScanTimeoutOnOpenScanner
verify that we honorHConstants.HBASE_RPC_READ_TIMEOUT_KEYfor openScanner() calls for meta scans- Throws:
IOException
-
testNormalScanTimeoutOnOpenScannerAsync
AsyncTable version of above- Throws:
IOException
-
testMetaScanTimeoutOnNext
verify that we honorConnectionConfiguration.HBASE_CLIENT_META_SCANNER_TIMEOUTfor 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_KEYfor 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
-