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 SummaryNested ClassesModifier and TypeClassDescriptionstatic final classprivate static final classThisRSRpcServicesclass injects delay for Rpc calls and after executes super methods.
- 
Field SummaryFieldsModifier 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 SummaryConstructors
- 
Method SummaryModifier 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- 
TestClientOperationTimeoutpublic TestClientOperationTimeout()
 
- 
- 
Method Details- 
setUp- Throws:
- Exception
 
- 
tearDown- Throws:
- Exception
 
- 
setUpBeforeTest- Throws:
- Exception
 
- 
testGetTimeoutTests that a get on a table throwsRetriesExhaustedExceptionwhen the operation takes longer than 'hbase.client.operation.timeout'.
- 
testPutTimeoutTests that a put on a table throwsRetriesExhaustedExceptionwhen the operation takes longer than 'hbase.client.operation.timeout'.
- 
testMultiPutsTimeoutTests that a batch mutate on a table throwsRetriesExhaustedExceptionwhen the operation takes longer than 'hbase.client.operation.timeout'.
- 
testScanTimeoutTests that scan on a table throwsRetriesExhaustedExceptionwhen the operation takes longer than 'hbase.client.scanner.timeout.period'.- Throws:
- IOException
- InterruptedException
 
 
-