You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/06/28 00:52:58 UTC

[GitHub] [hbase] brfrn169 opened a new pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

brfrn169 opened a new pull request #1991:
URL: https://github.com/apache/hbase/pull/1991


   … introduced in HBASE-8458


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



[GitHub] [hbase] Apache-HBase commented on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-650667323


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 30s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 23s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 42s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   2m 29s |  master passed  |
   | +1 :green_heart: |  spotbugs  |   4m 53s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 22s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   2m 26s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  hadoopcheck  |  11m  8s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1.  |
   | +1 :green_heart: |  spotbugs  |   5m 30s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 49s |  The patch does not generate ASF License warnings.  |
   |  |   |  43m 26s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1991 |
   | Optional Tests | dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle |
   | uname | Linux 92f10dc17f7d 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 47742b2083 |
   | Max. process+thread count | 94 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server hbase-thrift hbase-rest U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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



[GitHub] [hbase] Apache-HBase commented on pull request #1991: HBASE-24650 Change the return types of the new checkAndMutate methods…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-653911439


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m  9s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  3s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 22s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 56s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 18s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   6m  6s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m 48s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 47s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 16s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 16s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   6m  3s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m 46s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 14s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  | 202m 13s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |   5m 18s |  hbase-thrift in the patch passed.  |
   | +1 :green_heart: |  unit  |   4m  2s |  hbase-rest in the patch passed.  |
   |  |   | 244m 51s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1991 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 069beffa18fd 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / a7a0e1a596 |
   | Default Java | 1.8.0_232 |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/testReport/ |
   | Max. process+thread count | 2833 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server hbase-thrift hbase-rest U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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



[GitHub] [hbase] Apache-HBase commented on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-653726290


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 29s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  3s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 23s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m  9s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 35s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   6m  8s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m 49s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 16s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m  4s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 27s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 27s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   6m 19s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m 52s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 12s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  | 232m 13s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |   5m 50s |  hbase-thrift in the patch passed.  |
   | +1 :green_heart: |  unit  |   3m 51s |  hbase-rest in the patch passed.  |
   |  |   | 276m 48s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1991 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 55dfc53b3d84 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / e614b89c33 |
   | Default Java | 1.8.0_232 |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/testReport/ |
   | Max. process+thread count | 3330 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server hbase-thrift hbase-rest U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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



[GitHub] [hbase] brfrn169 commented on a change in pull request #1991: HBASE-24650 Change the return types of the new checkAndMutate methods…

Posted by GitBox <gi...@apache.org>.
brfrn169 commented on a change in pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#discussion_r450112215



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncTableImpl.java
##########
@@ -497,7 +497,7 @@ public void run(MultiResponse resp) {
                     "Failed to mutate row: " + Bytes.toStringBinary(mutation.getRow()), ex));
               } else {
                 future.complete(respConverter
-                  .apply((Result) multiResp.getResults().get(regionName).result.get(0)));
+                  .apply((RES) multiResp.getResults().get(regionName).result.get(0)));

Review comment:
       Is there any problem here?




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



[GitHub] [hbase] brfrn169 commented on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
brfrn169 commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-653704586


   Ping @Apache9. Thanks.


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



[GitHub] [hbase] Apache-HBase commented on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-650713803


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 32s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  3s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 23s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 14s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 34s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   5m 44s |  branch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 27s |  hbase-client in master failed.  |
   | -0 :warning: |  javadoc  |   0m 21s |  hbase-rest in master failed.  |
   | -0 :warning: |  javadoc  |   0m 39s |  hbase-server in master failed.  |
   | -0 :warning: |  javadoc  |   0m 48s |  hbase-thrift in master failed.  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 15s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 58s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 33s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 33s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   5m 49s |  patch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 26s |  hbase-client in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 39s |  hbase-server in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 51s |  hbase-thrift in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 20s |  hbase-rest in the patch failed.  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 13s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  | 128m  2s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |   4m 22s |  hbase-thrift in the patch passed.  |
   | +1 :green_heart: |  unit  |   3m 12s |  hbase-rest in the patch passed.  |
   |  |   | 170m 17s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1991 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 5781817ac100 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 47742b2083 |
   | Default Java | 2020-01-14 |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-rest.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-thrift.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-thrift.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-rest.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/testReport/ |
   | Max. process+thread count | 3857 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server hbase-thrift hbase-rest U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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



[GitHub] [hbase] brfrn169 merged pull request #1991: HBASE-24650 Change the return types of the new checkAndMutate methods…

Posted by GitBox <gi...@apache.org>.
brfrn169 merged pull request #1991:
URL: https://github.com/apache/hbase/pull/1991


   


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



[GitHub] [hbase] brfrn169 commented on a change in pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
brfrn169 commented on a change in pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#discussion_r446588453



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncTableImpl.java
##########
@@ -349,7 +349,7 @@ private void preCheck() {
           loc, stub, mutation,
           (rn, rm) -> RequestConverter.buildMutateRequest(rn, row, family, qualifier, op, value,
             null, timeRange, rm),
-          resp -> resp.getExists()))
+          resp -> ((CheckAndMutateResult) resp).isSuccess()))

Review comment:
       I will modify it to make use of generic type. Thanks.

##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncTableImpl.java
##########
@@ -431,49 +431,49 @@ public CheckAndMutateWithFilterBuilder checkAndMutate(byte[] row, Filter filter)
       if (mutation instanceof Put) {
         validatePut((Put) mutation, conn.connConf.getMaxKeyValueSize());
       }
-      return RawAsyncTableImpl.this.<Boolean> newCaller(checkAndMutate.getRow(),
+      return RawAsyncTableImpl.this.<CheckAndMutateResult> newCaller(checkAndMutate.getRow(),
         mutation.getPriority(), rpcTimeoutNs)
         .action((controller, loc, stub) -> RawAsyncTableImpl.mutate(controller,
           loc, stub, mutation,
           (rn, m) -> RequestConverter.buildMutateRequest(rn, checkAndMutate.getRow(),
             checkAndMutate.getFamily(), checkAndMutate.getQualifier(),
             checkAndMutate.getCompareOp(), checkAndMutate.getValue(), checkAndMutate.getFilter(),
             checkAndMutate.getTimeRange(), m),
-          (c, r) -> r.getProcessed()))
+          (c, r) -> ResponseConverter.getCheckAndMutateResult(r)))
         .call();
     } else if (checkAndMutate.getAction() instanceof RowMutations) {
       RowMutations rowMutations = (RowMutations) checkAndMutate.getAction();
-      return RawAsyncTableImpl.this.<Boolean> newCaller(checkAndMutate.getRow(),
+      return RawAsyncTableImpl.this.<CheckAndMutateResult> newCaller(checkAndMutate.getRow(),
         rowMutations.getMaxPriority(), rpcTimeoutNs)
         .action((controller, loc, stub) -> RawAsyncTableImpl.this.mutateRow(controller,
           loc, stub, rowMutations,
           (rn, rm) -> RequestConverter.buildMutateRequest(rn, checkAndMutate.getRow(),
             checkAndMutate.getFamily(), checkAndMutate.getQualifier(),
             checkAndMutate.getCompareOp(), checkAndMutate.getValue(), checkAndMutate.getFilter(),
             checkAndMutate.getTimeRange(), rm),
-          resp -> resp.getExists()))
+          resp -> (CheckAndMutateResult) resp))
         .call();
     } else {
-      CompletableFuture<Boolean> future = new CompletableFuture<>();
+      CompletableFuture<CheckAndMutateResult> future = new CompletableFuture<>();
       future.completeExceptionally(new DoNotRetryIOException(
         "CheckAndMutate doesn't support " + checkAndMutate.getAction().getClass().getName()));
       return future;
     }
   }
 
   @Override
-  public List<CompletableFuture<Boolean>> checkAndMutate(List<CheckAndMutate> checkAndMutates) {
+  public List<CompletableFuture<CheckAndMutateResult>> checkAndMutate(
+    List<CheckAndMutate> checkAndMutates) {
     return batch(checkAndMutates, rpcTimeoutNs).stream()
-      .map(f -> f.thenApply(r -> ((Result)r).getExists()))
-      .collect(toList());
+      .map(f -> f.thenApply(r -> (CheckAndMutateResult) r)).collect(toList());
   }
 
   // We need the MultiRequest when constructing the org.apache.hadoop.hbase.client.MultiResponse,
   // so here I write a new method as I do not want to change the abstraction of call method.
   private <RESP> CompletableFuture<RESP> mutateRow(HBaseRpcController controller,
       HRegionLocation loc, ClientService.Interface stub, RowMutations mutation,
       Converter<MultiRequest, byte[], RowMutations> reqConvert,
-      Function<Result, RESP> respConverter) {
+      Function<Object, RESP> respConverter) {

Review comment:
       The reason why I changed Result to Object here is that this method is used by both checkAndMutate() and mutateRow() and we need to use different types each case (respectively CheckAndMutateResult and Result). However as you mentioned, we can make use of generic type here. I will modify it. Thanks.
   
   

##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/CheckAndMutateResult.java
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+import org.apache.yetus.audience.InterfaceAudience;
+import org.apache.yetus.audience.InterfaceStability;
+
+/**
+ * Represents a result of a CheckAndMutate operation
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Evolving

Review comment:
       Okay. I will remove the IS annotation. Thanks.




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



[GitHub] [hbase] Apache-HBase commented on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-650696971


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m  4s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  3s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 21s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 58s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 17s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   6m  3s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m 47s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 14s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 46s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 16s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 16s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   6m  4s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m 46s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 13s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  | 200m 28s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |   5m 18s |  hbase-thrift in the patch passed.  |
   | +1 :green_heart: |  unit  |   4m  2s |  hbase-rest in the patch passed.  |
   |  |   | 242m 56s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1991 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux c6441995d13a 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 47742b2083 |
   | Default Java | 1.8.0_232 |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/testReport/ |
   | Max. process+thread count | 2848 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server hbase-thrift hbase-rest U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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



[GitHub] [hbase] Apache-HBase commented on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-653708966


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   4m 12s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 35s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 28s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   2m 41s |  master passed  |
   | +1 :green_heart: |  spotbugs  |   5m 16s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 32s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   2m 40s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  hadoopcheck  |  11m 25s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1.  |
   | +1 :green_heart: |  spotbugs  |   5m 40s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 47s |  The patch does not generate ASF License warnings.  |
   |  |   |  48m 54s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1991 |
   | Optional Tests | dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle |
   | uname | Linux 54f3d51235b3 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / e614b89c33 |
   | Max. process+thread count | 94 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server hbase-thrift hbase-rest U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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



[GitHub] [hbase] brfrn169 edited a comment on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
brfrn169 edited a comment on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-653704405


   I missed that this had some checkstyle errors. I fixed the errors.


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



[GitHub] [hbase] Apache-HBase commented on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-653725750


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 31s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  3s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 23s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 54s |  master passed  |
   | +1 :green_heart: |  compile  |   3m  6s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   6m 36s |  branch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 27s |  hbase-client in master failed.  |
   | -0 :warning: |  javadoc  |   0m 20s |  hbase-rest in master failed.  |
   | -0 :warning: |  javadoc  |   0m 47s |  hbase-server in master failed.  |
   | -0 :warning: |  javadoc  |   1m  1s |  hbase-thrift in master failed.  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 14s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 53s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 59s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 59s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   6m 48s |  patch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 33s |  hbase-client in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 50s |  hbase-server in the patch failed.  |
   | -0 :warning: |  javadoc  |   1m 13s |  hbase-thrift in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 24s |  hbase-rest in the patch failed.  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 42s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  | 218m 54s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |   6m  1s |  hbase-thrift in the patch passed.  |
   | +1 :green_heart: |  unit  |   3m 56s |  hbase-rest in the patch passed.  |
   |  |   | 269m 37s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1991 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 5c3d57c1fb90 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / e614b89c33 |
   | Default Java | 2020-01-14 |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-rest.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-thrift.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-thrift.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-rest.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/testReport/ |
   | Max. process+thread count | 3329 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server hbase-thrift hbase-rest U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/3/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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



[GitHub] [hbase] brfrn169 commented on a change in pull request #1991: HBASE-24650 Change the return types of the new checkAndMutate methods…

Posted by GitBox <gi...@apache.org>.
brfrn169 commented on a change in pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#discussion_r449854459



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncTableImpl.java
##########
@@ -497,7 +497,7 @@ public void run(MultiResponse resp) {
                     "Failed to mutate row: " + Bytes.toStringBinary(mutation.getRow()), ex));
               } else {
                 future.complete(respConverter
-                  .apply((Result) multiResp.getResults().get(regionName).result.get(0)));
+                  .apply((RES) multiResp.getResults().get(regionName).result.get(0)));

Review comment:
       Yes, correct. Previously, we returned only Result type but after this fix, we will return Result (for normal mutateRow) and CheckAndMutateResult (for checkAndMutate). So I used a generic type here.

##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableOverAsyncTable.java
##########
@@ -300,13 +300,16 @@ public boolean thenMutate(RowMutations mutation) throws IOException {
   }
 
   @Override
-  public boolean checkAndMutate(CheckAndMutate checkAndMutate) throws IOException {
+  public CheckAndMutateResult checkAndMutate(CheckAndMutate checkAndMutate) throws IOException {
     return FutureUtils.get(table.checkAndMutate(checkAndMutate));
   }
 
   @Override
-  public boolean[] checkAndMutate(List<CheckAndMutate> checkAndMutates) throws IOException {
-    return Booleans.toArray(FutureUtils.get(table.checkAndMutateAll(checkAndMutates)));
+  public CheckAndMutateResult[] checkAndMutate(List<CheckAndMutate> checkAndMutates)

Review comment:
       Yeah that's better. I will change it.




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



[GitHub] [hbase] Apache-HBase commented on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-650701115


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 30s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 14s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 28s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   2m 26s |  master passed  |
   | +1 :green_heart: |  spotbugs  |   4m 48s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 20s |  the patch passed  |
   | -0 :warning: |  checkstyle  |   0m 27s |  hbase-client: The patch generated 8 new + 34 unchanged - 0 fixed = 42 total (was 34)  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  hadoopcheck  |  11m  5s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1.  |
   | +1 :green_heart: |  spotbugs  |   5m 29s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 48s |  The patch does not generate ASF License warnings.  |
   |  |   |  42m 52s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1991 |
   | Optional Tests | dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle |
   | uname | Linux 13e08aacd4d5 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 47742b2083 |
   | checkstyle | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/artifact/yetus-general-check/output/diff-checkstyle-hbase-client.txt |
   | Max. process+thread count | 94 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server hbase-thrift hbase-rest U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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



[GitHub] [hbase] Apache-HBase commented on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-650722132


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m  2s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  2s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 42s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 16s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   6m  1s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m 46s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 45s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 16s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 16s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   6m  0s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m 44s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 12s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  | 201m 31s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |   5m 21s |  hbase-thrift in the patch passed.  |
   | +1 :green_heart: |  unit  |   4m  0s |  hbase-rest in the patch passed.  |
   |  |   | 243m 24s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1991 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux edcfbc01ae67 4.15.0-101-generic #102-Ubuntu SMP Mon May 11 10:07:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 47742b2083 |
   | Default Java | 1.8.0_232 |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/testReport/ |
   | Max. process+thread count | 3432 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server hbase-thrift hbase-rest U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/2/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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



[GitHub] [hbase] brfrn169 commented on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
brfrn169 commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-653704405


   I missed that it had some checkstyle errors. I fixed the errors.


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



[GitHub] [hbase] Apache9 commented on a change in pull request #1991: HBASE-24650 Change the return types of the new checkAndMutate methods…

Posted by GitBox <gi...@apache.org>.
Apache9 commented on a change in pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#discussion_r449781947



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncTableImpl.java
##########
@@ -497,7 +497,7 @@ public void run(MultiResponse resp) {
                     "Failed to mutate row: " + Bytes.toStringBinary(mutation.getRow()), ex));
               } else {
                 future.complete(respConverter
-                  .apply((Result) multiResp.getResults().get(regionName).result.get(0)));
+                  .apply((RES) multiResp.getResults().get(regionName).result.get(0)));

Review comment:
       OK, so the problem here is that, the result for a multi operation is an Object? And we will have two types, one is Result, for normal mutateRow, and the other is CheckAndMutateResult, for checkAndMutate?

##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/TableOverAsyncTable.java
##########
@@ -300,13 +300,16 @@ public boolean thenMutate(RowMutations mutation) throws IOException {
   }
 
   @Override
-  public boolean checkAndMutate(CheckAndMutate checkAndMutate) throws IOException {
+  public CheckAndMutateResult checkAndMutate(CheckAndMutate checkAndMutate) throws IOException {
     return FutureUtils.get(table.checkAndMutate(checkAndMutate));
   }
 
   @Override
-  public boolean[] checkAndMutate(List<CheckAndMutate> checkAndMutates) throws IOException {
-    return Booleans.toArray(FutureUtils.get(table.checkAndMutateAll(checkAndMutates)));
+  public CheckAndMutateResult[] checkAndMutate(List<CheckAndMutate> checkAndMutates)

Review comment:
       Better to return a List?




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



[GitHub] [hbase] Apache-HBase commented on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-650687068


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 31s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  3s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 22s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 12s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 33s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   5m 47s |  branch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 27s |  hbase-client in master failed.  |
   | -0 :warning: |  javadoc  |   0m 20s |  hbase-rest in master failed.  |
   | -0 :warning: |  javadoc  |   0m 39s |  hbase-server in master failed.  |
   | -0 :warning: |  javadoc  |   0m 49s |  hbase-thrift in master failed.  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 14s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 56s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 34s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 34s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   5m 43s |  patch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 25s |  hbase-client in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 39s |  hbase-server in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 50s |  hbase-thrift in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 19s |  hbase-rest in the patch failed.  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 13s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  | 127m 40s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |   4m 21s |  hbase-thrift in the patch passed.  |
   | +1 :green_heart: |  unit  |   3m 12s |  hbase-rest in the patch passed.  |
   |  |   | 169m 45s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1991 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux b0b754ac7ac1 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 47742b2083 |
   | Default Java | 2020-01-14 |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-rest.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-thrift.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-thrift.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-rest.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/testReport/ |
   | Max. process+thread count | 4397 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server hbase-thrift hbase-rest U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/1/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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



[GitHub] [hbase] Apache9 commented on a change in pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
Apache9 commented on a change in pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#discussion_r446586775



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/CheckAndMutateResult.java
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+import org.apache.yetus.audience.InterfaceAudience;
+import org.apache.yetus.audience.InterfaceStability;
+
+/**
+ * Represents a result of a CheckAndMutate operation
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Evolving

Review comment:
       For IA.Public, we do not use the IS annotation since it should always be Stable.

##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncTableImpl.java
##########
@@ -431,49 +431,49 @@ public CheckAndMutateWithFilterBuilder checkAndMutate(byte[] row, Filter filter)
       if (mutation instanceof Put) {
         validatePut((Put) mutation, conn.connConf.getMaxKeyValueSize());
       }
-      return RawAsyncTableImpl.this.<Boolean> newCaller(checkAndMutate.getRow(),
+      return RawAsyncTableImpl.this.<CheckAndMutateResult> newCaller(checkAndMutate.getRow(),
         mutation.getPriority(), rpcTimeoutNs)
         .action((controller, loc, stub) -> RawAsyncTableImpl.mutate(controller,
           loc, stub, mutation,
           (rn, m) -> RequestConverter.buildMutateRequest(rn, checkAndMutate.getRow(),
             checkAndMutate.getFamily(), checkAndMutate.getQualifier(),
             checkAndMutate.getCompareOp(), checkAndMutate.getValue(), checkAndMutate.getFilter(),
             checkAndMutate.getTimeRange(), m),
-          (c, r) -> r.getProcessed()))
+          (c, r) -> ResponseConverter.getCheckAndMutateResult(r)))
         .call();
     } else if (checkAndMutate.getAction() instanceof RowMutations) {
       RowMutations rowMutations = (RowMutations) checkAndMutate.getAction();
-      return RawAsyncTableImpl.this.<Boolean> newCaller(checkAndMutate.getRow(),
+      return RawAsyncTableImpl.this.<CheckAndMutateResult> newCaller(checkAndMutate.getRow(),
         rowMutations.getMaxPriority(), rpcTimeoutNs)
         .action((controller, loc, stub) -> RawAsyncTableImpl.this.mutateRow(controller,
           loc, stub, rowMutations,
           (rn, rm) -> RequestConverter.buildMutateRequest(rn, checkAndMutate.getRow(),
             checkAndMutate.getFamily(), checkAndMutate.getQualifier(),
             checkAndMutate.getCompareOp(), checkAndMutate.getValue(), checkAndMutate.getFilter(),
             checkAndMutate.getTimeRange(), rm),
-          resp -> resp.getExists()))
+          resp -> (CheckAndMutateResult) resp))
         .call();
     } else {
-      CompletableFuture<Boolean> future = new CompletableFuture<>();
+      CompletableFuture<CheckAndMutateResult> future = new CompletableFuture<>();
       future.completeExceptionally(new DoNotRetryIOException(
         "CheckAndMutate doesn't support " + checkAndMutate.getAction().getClass().getName()));
       return future;
     }
   }
 
   @Override
-  public List<CompletableFuture<Boolean>> checkAndMutate(List<CheckAndMutate> checkAndMutates) {
+  public List<CompletableFuture<CheckAndMutateResult>> checkAndMutate(
+    List<CheckAndMutate> checkAndMutates) {
     return batch(checkAndMutates, rpcTimeoutNs).stream()
-      .map(f -> f.thenApply(r -> ((Result)r).getExists()))
-      .collect(toList());
+      .map(f -> f.thenApply(r -> (CheckAndMutateResult) r)).collect(toList());
   }
 
   // We need the MultiRequest when constructing the org.apache.hadoop.hbase.client.MultiResponse,
   // so here I write a new method as I do not want to change the abstraction of call method.
   private <RESP> CompletableFuture<RESP> mutateRow(HBaseRpcController controller,
       HRegionLocation loc, ClientService.Interface stub, RowMutations mutation,
       Converter<MultiRequest, byte[], RowMutations> reqConvert,
-      Function<Result, RESP> respConverter) {
+      Function<Object, RESP> respConverter) {

Review comment:
       Object is too generic. Please explain why we need to do this change?

##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncTableImpl.java
##########
@@ -349,7 +349,7 @@ private void preCheck() {
           loc, stub, mutation,
           (rn, rm) -> RequestConverter.buildMutateRequest(rn, row, family, qualifier, op, value,
             null, timeRange, rm),
-          resp -> resp.getExists()))
+          resp -> ((CheckAndMutateResult) resp).isSuccess()))

Review comment:
       We have already make use of generic type so why here we still need to cast?




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



[GitHub] [hbase] brfrn169 commented on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
brfrn169 commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-652712937


   @Apache9 Please let me know if you have any questions about this. Thank you in advance.


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



[GitHub] [hbase] Apache-HBase commented on pull request #1991: HBASE-24650 Change the return types of the new checkAndMutate methods…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-653910812


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 16s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  3s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 22s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 42s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 45s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   6m 29s |  branch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 27s |  hbase-client in master failed.  |
   | -0 :warning: |  javadoc  |   0m 19s |  hbase-rest in master failed.  |
   | -0 :warning: |  javadoc  |   0m 40s |  hbase-server in master failed.  |
   | -0 :warning: |  javadoc  |   1m  0s |  hbase-thrift in master failed.  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 32s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 43s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 43s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   6m 22s |  patch has no errors when building our shaded downstream artifacts.  |
   | -0 :warning: |  javadoc  |   0m 26s |  hbase-client in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 41s |  hbase-server in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 57s |  hbase-thrift in the patch failed.  |
   | -0 :warning: |  javadoc  |   0m 19s |  hbase-rest in the patch failed.  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   1m 20s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  | 191m 51s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |   5m 15s |  hbase-thrift in the patch passed.  |
   | +1 :green_heart: |  unit  |   3m 26s |  hbase-rest in the patch passed.  |
   |  |   | 238m 29s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1991 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 4aef4cce48bd 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / a7a0e1a596 |
   | Default Java | 2020-01-14 |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-rest.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-hbase-thrift.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-client.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-server.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-thrift.txt |
   | javadoc | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-hbase-rest.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/testReport/ |
   | Max. process+thread count | 3458 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server hbase-thrift hbase-rest U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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



[GitHub] [hbase] Apache-HBase commented on pull request #1991: HBASE-24650 Change the return types of the new checkAndMutate methods…

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-653889258


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 29s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 22s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 37s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   2m 47s |  master passed  |
   | +1 :green_heart: |  spotbugs  |   4m 51s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 21s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   2m 29s |  the patch passed  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  hadoopcheck  |  11m 22s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1.  |
   | +1 :green_heart: |  spotbugs  |   5m 27s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 49s |  The patch does not generate ASF License warnings.  |
   |  |   |  43m 54s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.12 Server=19.03.12 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1991 |
   | Optional Tests | dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle |
   | uname | Linux bd0126a7ef78 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / a7a0e1a596 |
   | Max. process+thread count | 94 (vs. ulimit of 12500) |
   | modules | C: hbase-client hbase-server hbase-thrift hbase-rest U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1991/4/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) spotbugs=3.1.12 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


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



[GitHub] [hbase] ouyangshourui commented on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
ouyangshourui commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-650670742


   unsubscribe
   
   
   
   
   Best Regards&nbsp;
   
   Ricky Yang
   
   
   
   
   
   
   
   
   &nbsp;
   
   
   
   
   ------------------&nbsp;原始邮件&nbsp;------------------
   发件人:&nbsp;"Toshihiro Suzuki"<notifications@github.com&gt;;
   发送时间:&nbsp;2020年6月28日(星期天) 上午10:01
   收件人:&nbsp;"apache/hbase"<hbase@noreply.github.com&gt;;
   抄送:&nbsp;"Subscribed"<subscribed@noreply.github.com&gt;;
   主题:&nbsp;Re: [apache/hbase] HBASE-24650 Change the return types of the new CheckAndMutate methods… (#1991)
   
   
   
   
   
    
   @brfrn169 commented on this pull request.
    
   Thank you for taking a look at this!
    
   Yes, the old checkAndXXX methods are not effected. I'm going to add Increment/Append support to CheckAndMutate only for the new checkAndMutate methods.
   
    
   In hbase-client/src/main/java/org/apache/hadoop/hbase/client/CheckAndMutateResult.java:
    &gt; + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase.client; + +import org.apache.yetus.audience.InterfaceAudience; +import org.apache.yetus.audience.InterfaceStability; + +/** + * Represents a result of a CheckAndMutate operation + */ +@InterfaceAudience.Public +@InterfaceStability.Evolving  
   Okay. I will remove the IS annotation. Thanks.
    
    
   In hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncTableImpl.java:
    &gt; @@ -349,7 +349,7 @@ private void preCheck() {            loc, stub, mutation,            (rn, rm) -&gt; RequestConverter.buildMutateRequest(rn, row, family, qualifier, op, value,              null, timeRange, rm), -          resp -&gt; resp.getExists())) +          resp -&gt; ((CheckAndMutateResult) resp).isSuccess()))  
   I will modify it to make use of generic type. Thanks.
    
    
   In hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncTableImpl.java:
    &gt;    }      // We need the MultiRequest when constructing the org.apache.hadoop.hbase.client.MultiResponse,    // so here I write a new method as I do not want to change the abstraction of call method.    private <RESP&gt; CompletableFuture<RESP&gt; mutateRow(HBaseRpcController controller,        HRegionLocation loc, ClientService.Interface stub, RowMutations mutation,        Converter<MultiRequest, byte[], RowMutations&gt; reqConvert, -      Function<Result, RESP&gt; respConverter) { +      Function<Object, RESP&gt; respConverter) {  
   The reason why I changed Result to Object here is that this method is used by both checkAndMutate() and mutateRow() and we need to use different types each case (respectively CheckAndMutateResult and Result). However as you mentioned, we can make use of generic type here. I will modify it. Thanks.
    
   —
   You are receiving this because you are subscribed to this thread.
   Reply to this email directly, view it on GitHub, or unsubscribe.


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



[GitHub] [hbase] brfrn169 commented on pull request #1991: HBASE-24650 Change the return types of the new CheckAndMutate methods…

Posted by GitBox <gi...@apache.org>.
brfrn169 commented on pull request #1991:
URL: https://github.com/apache/hbase/pull/1991#issuecomment-650964420


   I modified the patch for the review and looks the QA is okay. 
   
   @Apache9 Can you please review this? Thank you in advance. 


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