private static Result getMutateRowResult(RegionActionResult actionResult, CellScanner cells)
    throws IOException {
    if (actionResult.getProcessed()) {
      Result result = null;
      if (actionResult.getResultOrExceptionCount() > 0) {
        // Get the result of the Increment/Append operations from the first element of the
        // ResultOrException list
        ResultOrException roe = actionResult.getResultOrException(0);
        Result r = ProtobufUtil.toResult(roe.getResult(), cells);
        if (!r.isEmpty()) {
          r.setExists(true);
          result = r;
        }
      }
      if (result != null) {
        return result;
      } else {
        return ProtobufUtil.EMPTY_RESULT_EXISTS_TRUE;
      }
    } else {
      return ProtobufUtil.EMPTY_RESULT_EXISTS_FALSE;
    }
  }
Get the results from a protocol buffer MultiResponse
@param request  the original protocol buffer MultiRequest
@param indexMap Used to support RowMutations/CheckAndMutate in batch
@param response the protocol buffer MultiResponse to convert
@param cells    Cells to go with the passed in <code>proto</code>. Can be null.
@return the results that were in the MultiResponse (a Result or an Exception).
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ResponseConverter.java