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 Summary
Modifier and TypeFieldDescriptionprivate static final int
static final HBaseClassTestRule
private static final byte[]
private static final org.slf4j.Logger
private static final org.apache.hadoop.hbase.TableName
private static final HBaseTestingUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
assertObjects
(Object[] objs, int expectedSize) void
before()
private static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiRequest
createRequest
(org.apache.hadoop.hbase.client.RowMutations rm, byte[] regionName) static void
void
tearDown()
static void
void
The invalid cells is in rm.void
This test depends on how regionserver process the batch ops.void
The purpose of this ut is to check the consistency between the exception and results.void
This 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
-
TestMalformedCellFromClient
public TestMalformedCellFromClient()
-
-
Method Details
-
setUpBeforeClass
- Throws:
Exception
-
before
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
testRegionException
The 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
-
testRegionExceptionByAsync
This 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
-
testAtomicOperations
The 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
-
createRequest
private static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiRequest createRequest(org.apache.hadoop.hbase.client.RowMutations rm, byte[] regionName) throws IOException - Throws:
IOException
-
testNonAtomicOperations
This 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
-