public static MutateRequest buildMutateRequest(final byte[] regionName, final byte[] row,
    final byte[] family, final byte[] qualifier, final CompareOperator op, final byte[] value,
    final Filter filter, final TimeRange timeRange, final Mutation mutation, long nonceGroup,
    long nonce, boolean queryMetricsEnabled) throws IOException {
    MutateRequest.Builder builder = MutateRequest.newBuilder();
    if (mutation instanceof Increment || mutation instanceof Append) {
      builder.setMutation(ProtobufUtil.toMutation(getMutationType(mutation), mutation, nonce))
        .setNonceGroup(nonceGroup);
    } else {
      builder.setMutation(ProtobufUtil.toMutation(getMutationType(mutation), mutation));
    }
    return builder.setRegion(buildRegionSpecifier(RegionSpecifierType.REGION_NAME, regionName))
      .setCondition(ProtobufUtil.toCondition(row, family, qualifier, op, value, filter, timeRange,
        queryMetricsEnabled))
      .build();
  }
Create a protocol buffer MutateRequest for a conditioned put/delete/increment/append
@return a mutate request
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java