Package org.apache.hadoop.hbase.client
Class TestClientScannerTimeouts
java.lang.Object
org.apache.hadoop.hbase.client.TestClientScannerTimeouts
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprivate static classprivate static class
- 
Field SummaryFieldsModifier 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 SummaryConstructors
- 
Method SummaryModifier 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
- 
asyncTableprivate static org.apache.hadoop.hbase.client.AsyncTable<org.apache.hadoop.hbase.client.AdvancedScanResultConsumer> asyncTable
- 
name
 
- 
- 
Constructor Details- 
TestClientScannerTimeoutspublic TestClientScannerTimeouts()
 
- 
- 
Method Details- 
setUpBeforeClass- Throws:
- Exception
 
- 
tearDownAfterClass- Throws:
- Exception
 
- 
setup- Throws:
- IOException
 
- 
expectRow
- 
expectNumTries
- 
testRetryOutOfOrderScannerNextExceptionverify 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
 
- 
testRetryOutOfOrderScannerNextExceptionAsyncAsyncTable version of above- Throws:
- IOException
 
- 
testNormalScanTimeoutOnNextverify that we honor theHConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIODfor normal scans.- Throws:
- IOException
 
- 
testNormalScanTimeoutOnNextAsyncAsyncTable version of above- Throws:
- IOException
 
- 
testNormalScanTimeoutOnOpenScannerverify that we honorHConstants.HBASE_RPC_READ_TIMEOUT_KEYfor openScanner() calls for meta scans- Throws:
- IOException
 
- 
testNormalScanTimeoutOnOpenScannerAsyncAsyncTable version of above- Throws:
- IOException
 
- 
testMetaScanTimeoutOnNextverify that we honorConnectionConfiguration.HBASE_CLIENT_META_SCANNER_TIMEOUTfor next() calls in meta scans- Throws:
- IOException
 
- 
testMetaScanTimeoutOnNextAsyncAsyncTable version of above- Throws:
- IOException
 
- 
testMetaScanTimeoutOnOpenScannerverify that we honorConnectionConfiguration.HBASE_CLIENT_META_READ_RPC_TIMEOUT_KEYfor openScanner() calls for meta scans- Throws:
- IOException
 
- 
testMetaScanTimeoutOnOpenScannerAsyncAsyncTable version of above- Throws:
- IOException
 
- 
expectRetryOutOfOrderScannerNextprivate void expectRetryOutOfOrderScannerNext(Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) throws IOException - Throws:
- IOException
 
- 
expectTimeoutOnNextprivate void expectTimeoutOnNext(int timeout, Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) throws IOException - Throws:
- IOException
 
- 
expectTimeoutOnOpenScannerprivate void expectTimeoutOnOpenScanner(int timeout, Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) throws IOException - Throws:
- IOException
 
- 
expectTimeout
- 
getScanner
- 
getAsyncScanner
- 
putToTable- Throws:
- IOException
 
 
-