Class TestMalformedCellFromClient

java.lang.Object
org.apache.hadoop.hbase.client.TestMalformedCellFromClient

public class TestMalformedCellFromClient extends Object
The purpose of this test is to ensure whether rs deals with the malformed cells correctly.
  • Field Details

  • Constructor Details

  • Method Details

    • setUpBeforeClass

      public static void setUpBeforeClass() throws Exception
      Throws:
      Exception
    • before

      public void before() throws Exception
      Throws:
      Exception
    • tearDown

      public void tearDown() throws Exception
      Throws:
      Exception
    • tearDownAfterClass

      public static void tearDownAfterClass() throws Exception
      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

      public void testRegionExceptionByAsync() throws Exception
      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

      public void testAtomicOperations() throws Exception
      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

      private static void assertObjects(Object[] objs, int expectedSize)