Package org.apache.hadoop.hbase.client
Class TestMalformedCellFromClient
java.lang.Object
org.apache.hadoop.hbase.client.TestMalformedCellFromClient
The purpose of this test is to ensure whether rs deals with the malformed cells correctly.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final intstatic final HBaseClassTestRuleprivate static final byte[]private static final org.slf4j.Loggerprivate static final org.apache.hadoop.hbase.TableNameprivate static final HBaseTestingUtil
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate static voidassertObjects(Object[] objs, int expectedSize) voidbefore()private static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiRequestcreateRequest(org.apache.hadoop.hbase.client.RowMutations rm, byte[] regionName) static voidvoidtearDown()static voidvoidThe invalid cells is in rm.voidThis test depends on how regionserver process the batch ops.voidThe purpose of this ut is to check the consistency between the exception and results.voidThis test verifies region exception doesn't corrupt the results of batch.void
- 
Field Details- 
LOG
- 
CLASS_RULE
- 
TEST_UTIL
- 
FAMILY
- 
CELL_SIZE- See Also:
 
- 
TABLE_NAME
 
- 
- 
Constructor Details- 
TestMalformedCellFromClientpublic TestMalformedCellFromClient()
 
- 
- 
Method Details- 
setUpBeforeClass- Throws:
- Exception
 
- 
before- Throws:
- Exception
 
- 
tearDown- Throws:
- Exception
 
- 
tearDownAfterClass- Throws:
- Exception
 
- 
testRegionExceptionThe purpose of this ut is to check the consistency between the exception and results. If the RetriesExhaustedWithDetailsException contains the whole batch, each result should be of IOE. Otherwise, the row operation which is not in the exception should have a true result.- Throws:
- InterruptedException
- IOException
 
- 
testRegionExceptionByAsyncThis test verifies region exception doesn't corrupt the results of batch. The prescription is shown below. 1) honor the action result rather than region exception. If the action have both of true result and region exception, the action is fine as the exception is caused by other actions which are in the same region. 2) honor the action exception rather than region exception. If the action have both of action exception and region exception, we deal with the action exception only. If we also handle the region exception for the same action, it will introduce the negative count of actions in progress. The AsyncRequestFuture#waitUntilDone will block forever. If the RetriesExhaustedWithDetailsException contains the whole batch, each result should be of IOE. Otherwise, the row operation which is not in the exception should have a true result. The no-cluster test is in TestAsyncProcessWithRegionException.- Throws:
- Exception
 
- 
testAtomicOperationsThe invalid cells is in rm. The rm should fail but the subsequent mutations should succeed. Currently, we have no client api to submit the request consisting of condition-rm and mutation. Hence, this test build the request manually.- Throws:
- Exception
 
- 
createRequestprivate static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiRequest createRequest(org.apache.hadoop.hbase.client.RowMutations rm, byte[] regionName) throws IOException - Throws:
- IOException
 
- 
testNonAtomicOperationsThis test depends on how regionserver process the batch ops. 1) group the put/delete until meeting the increment 2) process the batch of put/delete 3) process the increment see RSRpcServices#doNonAtomicRegionMutation- Throws:
- InterruptedException
- IOException
 
- 
testRowMutations- Throws:
- InterruptedException
- IOException
 
- 
assertObjects
 
-