Summary of the change of
HBASE-24602:
- Add `build(Increment)` and `build(Append)` methods to the `Builder` class of the `CheckAndMutate` class. After this change, we can perform checkAndIncrement/Append operations as follows:
```
// Build a CheckAndMutate object with a Increment object
CheckAndMutate checkAndMutate = CheckAndMutate.newBuilder(row)
.ifEquals(family, qualifier, value)
.build(increment);
// Perform a CheckAndIncrement operation
CheckAndMutateResult checkAndMutateResult = table.checkAndMutate(checkAndMutate);
// Get whether or not the CheckAndIncrement operation is successful
boolean success = checkAndMutateResult.isSuccess();
// Get the result of the increment operation
Result result = checkAndMutateResult.getResult();
```
- After this change, `HRegion.batchMutate()` is used for increment/append operations.
- As the side effect of the above change, the following coprocessor methods of RegionObserver are called when increment/append operations are performed:
- preBatchMutate()
- postBatchMutate()
- postBatchMutateIndispensably()