public class TestClientScannerTimeouts extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
TestClientScannerTimeouts.RegionServerWithScanTimeout |
private static class |
TestClientScannerTimeouts.RSRpcServicesWithScanTimeout |
Modifier and Type | Field and Description |
---|---|
private static org.apache.hadoop.hbase.client.AsyncConnection |
ASYNC_CONN |
private static org.apache.hadoop.hbase.client.AsyncTable<org.apache.hadoop.hbase.client.AdvancedScanResultConsumer> |
asyncTable |
static HBaseClassTestRule |
CLASS_RULE |
private static int |
CLIENT_RETRIES_NUMBER |
private static org.apache.hadoop.hbase.client.Connection |
CONN |
private static byte[] |
FAMILY |
private static org.slf4j.Logger |
LOG |
private static int |
metaScanTimeout |
org.junit.rules.TestName |
name |
private static byte[] |
QUALIFIER |
private static byte[] |
ROW0 |
private static byte[] |
ROW1 |
private static byte[] |
ROW2 |
private static byte[] |
ROW3 |
private static int |
rpcTimeout |
private static int |
scanTimeout |
private static org.apache.hadoop.hbase.client.Table |
table |
private static HBaseTestingUtil |
TEST_UTIL |
private static byte[] |
VALUE |
Constructor and Description |
---|
TestClientScannerTimeouts() |
Modifier and Type | Method and Description |
---|---|
private 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 |
getAsyncScanner() |
private org.apache.hadoop.hbase.client.ResultScanner |
getScanner() |
private void |
putToTable(org.apache.hadoop.hbase.client.Table ht,
byte[] rowkey) |
void |
setup(boolean isSystemTable) |
static void |
setUpBeforeClass() |
static void |
tearDownAfterClass() |
void |
testMetaScanTimeoutOnNext()
verify that we honor
ConnectionConfiguration.HBASE_CLIENT_META_SCANNER_TIMEOUT for
next() calls in meta scans |
void |
testMetaScanTimeoutOnNextAsync()
AsyncTable version of above
|
void |
testMetaScanTimeoutOnOpenScanner()
verify that we honor
ConnectionConfiguration.HBASE_CLIENT_META_READ_RPC_TIMEOUT_KEY for
openScanner() calls for meta scans |
void |
testMetaScanTimeoutOnOpenScannerAsync()
AsyncTable version of above
|
void |
testNormalScanTimeoutOnNext()
verify that we honor the
HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD for normal
scans. |
void |
testNormalScanTimeoutOnNextAsync()
AsyncTable version of above
|
void |
testNormalScanTimeoutOnOpenScanner()
verify that we honor
HConstants.HBASE_RPC_READ_TIMEOUT_KEY for openScanner() calls for
meta scans |
void |
testNormalScanTimeoutOnOpenScannerAsync()
AsyncTable version of above
|
void |
testRetryOutOfOrderScannerNextException()
verify that we don't miss any data when encountering an OutOfOrderScannerNextException.
|
void |
testRetryOutOfOrderScannerNextExceptionAsync()
AsyncTable version of above
|
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtil TEST_UTIL
private static org.apache.hadoop.hbase.client.AsyncConnection ASYNC_CONN
private static org.apache.hadoop.hbase.client.Connection CONN
private static final byte[] FAMILY
private static final byte[] QUALIFIER
private static final byte[] VALUE
private static final byte[] ROW0
private static final byte[] ROW1
private static final byte[] ROW2
private static final byte[] ROW3
private static final int rpcTimeout
private static final int scanTimeout
private static final int metaScanTimeout
private static final int CLIENT_RETRIES_NUMBER
private static org.apache.hadoop.hbase.client.Table table
private static org.apache.hadoop.hbase.client.AsyncTable<org.apache.hadoop.hbase.client.AdvancedScanResultConsumer> asyncTable
public org.junit.rules.TestName name
public TestClientScannerTimeouts()
public static void setUpBeforeClass() throws Exception
Exception
public static void tearDownAfterClass() throws Exception
Exception
public void setup(boolean isSystemTable) throws IOException
IOException
private void expectRow(byte[] expected, org.apache.hadoop.hbase.client.Result result)
private void expectNumTries(int expected)
public void testRetryOutOfOrderScannerNextException() throws IOException
IOException
public void testRetryOutOfOrderScannerNextExceptionAsync() throws IOException
IOException
public void testNormalScanTimeoutOnNext() throws IOException
HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD
for normal
scans.IOException
public void testNormalScanTimeoutOnNextAsync() throws IOException
IOException
public void testNormalScanTimeoutOnOpenScanner() throws IOException
HConstants.HBASE_RPC_READ_TIMEOUT_KEY
for openScanner() calls for
meta scansIOException
public void testNormalScanTimeoutOnOpenScannerAsync() throws IOException
IOException
public void testMetaScanTimeoutOnNext() throws IOException
ConnectionConfiguration.HBASE_CLIENT_META_SCANNER_TIMEOUT
for
next() calls in meta scansIOException
public void testMetaScanTimeoutOnNextAsync() throws IOException
IOException
public void testMetaScanTimeoutOnOpenScanner() throws IOException
ConnectionConfiguration.HBASE_CLIENT_META_READ_RPC_TIMEOUT_KEY
for
openScanner() calls for meta scansIOException
public void testMetaScanTimeoutOnOpenScannerAsync() throws IOException
IOException
private void expectRetryOutOfOrderScannerNext(Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) throws IOException
IOException
private void expectTimeoutOnNext(int timeout, Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) throws IOException
IOException
private void expectTimeoutOnOpenScanner(int timeout, Supplier<org.apache.hadoop.hbase.client.ResultScanner> scannerSupplier) throws IOException
IOException
private void expectTimeout(long start, int timeout)
private org.apache.hadoop.hbase.client.ResultScanner getScanner()
private org.apache.hadoop.hbase.client.ResultScanner getAsyncScanner()
private void putToTable(org.apache.hadoop.hbase.client.Table ht, byte[] rowkey) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.