Apache9 commented on a change in pull request #1114: HBASE-23146 Support
CheckAndMutate with multi conditions
URL: https://github.com/apache/hbase/pull/1114#discussion_r373894999
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java
##########
@@ -212,54 +214,55 @@ public static MutateRequest buildMutateRequest(
* @param row
* @param family
* @param qualifier
- * @param comparator
- * @param compareType
+ * @param op
+ * @param value
* @param delete
* @return a mutate request
* @throws IOException
*/
public static MutateRequest buildMutateRequest(
- final byte[] regionName, final byte[] row, final byte[] family,
- final byte [] qualifier, final ByteArrayComparable comparator,
- final CompareType compareType, TimeRange timeRange, final Delete delete)
throws IOException {
- return buildMutateRequest(regionName, row, family, qualifier, comparator,
compareType, timeRange
- , delete, MutationType.DELETE);
+ 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 Delete delete) throws IOException {
+ return buildMutateRequest(regionName, row, family, qualifier, op, value,
filter, timeRange,
+ delete, MutationType.DELETE);
}
public static MutateRequest buildMutateRequest(final byte[] regionName,
final byte[] row,
- final byte[] family, final byte[] qualifier, final ByteArrayComparable
comparator,
- final CompareType compareType, TimeRange timeRange, final Mutation
mutation,
+ final byte[] family, final byte[] qualifier, final CompareOperator op,
final byte[] value,
+ final Filter filter, final TimeRange timeRange, final Mutation mutation,
final MutationType type) throws IOException {
return MutateRequest.newBuilder()
.setRegion(buildRegionSpecifier(RegionSpecifierType.REGION_NAME,
regionName))
.setMutation(ProtobufUtil.toMutation(type, mutation))
- .setCondition(buildCondition(row, family, qualifier, comparator,
compareType, timeRange))
+ .setCondition(buildCondition(row, family, qualifier, op, value, filter,
timeRange))
.build();
}
+
/**
* Create a protocol buffer MutateRequest for conditioned row mutations
*
* @param regionName
* @param row
* @param family
* @param qualifier
- * @param comparator
- * @param compareType
+ * @param op
Review comment:
Ditto.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services