brfrn169 commented on a change in pull request #1114: HBASE-23146 Support 
CheckAndMutate with multi conditions
URL: https://github.com/apache/hbase/pull/1114#discussion_r379977251
 
 

 ##########
 File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncTable.java
 ##########
 @@ -233,6 +234,28 @@
    */
   CheckAndMutateBuilder checkAndMutate(byte[] row, byte[] family);
 
+  /**
+   * Atomically checks if a row matches the specified filter. If it does, it 
adds the
+   * Put/Delete/RowMutations.
+   * <p>
+   * Use the returned {@link CheckAndMutateBuilder} to construct your request 
and then execute it.
+   * This is a fluent style API, the code is like:
+   *
+   * <pre>
+   * <code>
+   * table.checkAndMutate(row).ifMatches(filter).thenPut(put)
+   *     .thenAccept(succ -> {
+   *       if (succ) {
+   *         System.out.println("Check and put succeeded");
+   *       } else {
+   *         System.out.println("Check and put failed");
+   *       }
+   *     });
+   * </code>
+   * </pre>
+   */
+  CheckAndMutateBuilder checkAndMutate(byte[] row);
 
 Review comment:
   @Apache9 Thank you very much for the reply. 
   
   > we are still fighting with 2019-nCov so... Hope Japan will be safe...
   
   Oh okay.. I hope you are well... I'm okay now, but 2019-nCov is spreading 
little by little in Japan actually.
   
   > I still prefer that we introduce a new method which accepts a row and 
filter as parameters to construct a Builder, this is more natural. Enforcing 
usage by method signature is better than javadoc.
   
   Thank you for commenting on this. I will change the API as you mentioned.
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to