Package org.apache.hadoop.hbase
Class TestClientOperationTimeout
java.lang.Object
org.apache.hadoop.hbase.TestClientOperationTimeout
These tests verify that the RPC timeouts ('hbase.client.operation.timeout' and
'hbase.client.scanner.timeout.period') work correctly using a modified Region Server which
injects delays to get, scan and mutate operations.
When 'hbase.client.operation.timeout' is set and client operation is not completed in time the
client will retry the operation 'hbase.client.retries.number' times. After that
SocketTimeoutException will be thrown.
Using 'hbase.client.scanner.timeout.period' configuration property similar behavior can be
specified for scan related operations such as openScanner(), next(). If that times out
RetriesExhaustedException will be thrown.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classprivate static final classThisRSRpcServicesclass injects delay for Rpc calls and after executes super methods. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static org.apache.hadoop.hbase.client.Connectionprivate static intprivate static intprivate static intprivate static intprivate static final byte[]private static final org.slf4j.Loggerprivate static final byte[]private static final byte[]private static org.apache.hadoop.hbase.client.Tableprivate static final org.apache.hadoop.hbase.TableNameprivate static final HBaseTestingUtilprivate static final byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetUp()voidstatic voidtearDown()voidTests that a get on a table throwsRetriesExhaustedExceptionwhen the operation takes longer than 'hbase.client.operation.timeout'.voidTests that a batch mutate on a table throwsRetriesExhaustedExceptionwhen the operation takes longer than 'hbase.client.operation.timeout'.voidTests that a put on a table throwsRetriesExhaustedExceptionwhen the operation takes longer than 'hbase.client.operation.timeout'.voidTests that scan on a table throwsRetriesExhaustedExceptionwhen the operation takes longer than 'hbase.client.scanner.timeout.period'.
-
Field Details
-
LOG
-
CLASS_RULE
-
UTIL
-
DELAY_GET
-
DELAY_SCAN
-
DELAY_MUTATE
-
DELAY_BATCH_MUTATE
-
TABLE_NAME
-
FAMILY
-
ROW
-
QUALIFIER
-
VALUE
-
CONN
-
TABLE
-
-
Constructor Details
-
TestClientOperationTimeout
public TestClientOperationTimeout()
-
-
Method Details
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
setUpBeforeTest
- Throws:
Exception
-
testGetTimeout
Tests that a get on a table throwsRetriesExhaustedExceptionwhen the operation takes longer than 'hbase.client.operation.timeout'. -
testPutTimeout
Tests that a put on a table throwsRetriesExhaustedExceptionwhen the operation takes longer than 'hbase.client.operation.timeout'. -
testMultiPutsTimeout
Tests that a batch mutate on a table throwsRetriesExhaustedExceptionwhen the operation takes longer than 'hbase.client.operation.timeout'. -
testScanTimeout
Tests that scan on a table throwsRetriesExhaustedExceptionwhen the operation takes longer than 'hbase.client.scanner.timeout.period'.- Throws:
IOExceptionInterruptedException
-