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 2021/12/12 01:45:38 UTC

[GitHub] [hbase] apurtell opened a new pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

apurtell opened a new pull request #3936:
URL: https://github.com/apache/hbase/pull/3936


   Commits in the PR branch break down changes per module.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell edited a comment on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   Each module has its own commit in the PR branch @Apache9 . I think that is the best we can do as far as keeping each review item small. 
   
   In other words
   
   I am aware the patch is big over all. 
   
   So there are multiple commits on this PR. Find them here: https://github.com/apache/hbase/pull/3936/commits
   
   Each commit has the changes just for one maven module. 


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell commented on a change in pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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



##########
File path: hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestCoprocessorDescriptor.java
##########
@@ -71,7 +67,11 @@ public void testSetCoprocessor() throws IOException {
     List<CoprocessorDescriptor> cps = new ArrayList<>();
     for (String className : Arrays.asList("className0", "className1", "className2")) {
       String path = "path";
-      int priority = Math.abs(className.hashCode());
+      // Ensure priority is a positive integer
+      int priority = className.hashCode();
+      if (priority < 0) {
+        priority = -priority;

Review comment:
       As explained by the help text for the spotbugs finding the issue is Math.abs(INT_MIN) can return INT_MIN. So if ABS is supposed to ensure a positive number, it will not always do so. The fix is to change the sign of the value if it is negative and should not be negative.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 34s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  1s |  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 16s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 23s |  master passed  |
   | +1 :green_heart: |  compile  |  11m 38s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   5m 12s |  master passed  |
   | +1 :green_heart: |  spotbugs  |  10m 25s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 14s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 49s |  the patch passed  |
   | +1 :green_heart: |  compile  |  11m 37s |  the patch passed  |
   | +1 :green_heart: |  javac  |   0m 20s |  hbase-logging in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 49s |  hbase-common in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 25s |  hbase-metrics in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 56s |  hbase-client generated 0 new + 121 unchanged - 1 fixed = 121 total (was 122)  |
   | +1 :green_heart: |  javac  |   0m 31s |  hbase-zookeeper in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 27s |  hbase-replication in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 32s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 31s |  hbase-http in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 30s |  hbase-asyncfs in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 34s |  hbase-procedure in the patch passed.  |
   | -0 :warning: |  javac  |   3m 12s |  hbase-server generated 1 new + 192 unchanged - 1 fixed = 193 total (was 193)  |
   | -0 :warning: |  javac  |   0m 49s |  hbase-mapreduce generated 1 new + 197 unchanged - 1 fixed = 198 total (was 198)  |
   | +1 :green_heart: |  javac  |   0m 39s |  hbase-backup in the patch passed.  |
   | -0 :warning: |  javac  |   0m 40s |  hbase-it generated 2 new + 101 unchanged - 2 fixed = 103 total (was 103)  |
   | -0 :warning: |  javac  |   0m 42s |  hbase-rest generated 1 new + 184 unchanged - 4 fixed = 185 total (was 188)  |
   | +1 :green_heart: |  checkstyle  |   0m 11s |  The patch passed checkstyle in hbase-logging  |
   | +1 :green_heart: |  checkstyle  |   0m 24s |  hbase-common: The patch generated 0 new + 0 unchanged - 2 fixed = 0 total (was 2)  |
   | +1 :green_heart: |  checkstyle  |   0m 13s |  The patch passed checkstyle in hbase-metrics  |
   | +1 :green_heart: |  checkstyle  |   0m 27s |  The patch passed checkstyle in hbase-client  |
   | +1 :green_heart: |  checkstyle  |   0m 15s |  The patch passed checkstyle in hbase-zookeeper  |
   | +1 :green_heart: |  checkstyle  |   0m 14s |  The patch passed checkstyle in hbase-replication  |
   | +1 :green_heart: |  checkstyle  |   0m 16s |  The patch passed checkstyle in hbase-balancer  |
   | +1 :green_heart: |  checkstyle  |   0m 14s |  The patch passed checkstyle in hbase-http  |
   | +1 :green_heart: |  checkstyle  |   0m 14s |  hbase-asyncfs: The patch generated 0 new + 0 unchanged - 1 fixed = 0 total (was 1)  |
   | -0 :warning: |  checkstyle  |   0m 16s |  hbase-procedure: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)  |
   | -0 :warning: |  checkstyle  |   1m 15s |  hbase-server: The patch generated 3 new + 498 unchanged - 10 fixed = 501 total (was 508)  |
   | +1 :green_heart: |  checkstyle  |   0m 21s |  hbase-mapreduce: The patch generated 0 new + 44 unchanged - 1 fixed = 44 total (was 45)  |
   | +1 :green_heart: |  checkstyle  |   0m 15s |  The patch passed checkstyle in hbase-backup  |
   | +1 :green_heart: |  checkstyle  |   0m 20s |  The patch passed checkstyle in hbase-it  |
   | +1 :green_heart: |  checkstyle  |   0m 17s |  The patch passed checkstyle in hbase-rest  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  hadoopcheck  |  19m 22s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.  |
   | +1 :green_heart: |  spotbugs  |  13m 20s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   3m 11s |  The patch does not generate ASF License warnings.  |
   |  |   | 102m  9s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/3/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/3936 |
   | Optional Tests | dupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile |
   | uname | Linux 68f4319a7b36 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8bca21b47d |
   | Default Java | AdoptOpenJDK-1.8.0_282-b08 |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/3/artifact/yetus-general-check/output/diff-compile-javac-hbase-server.txt |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/3/artifact/yetus-general-check/output/diff-compile-javac-hbase-mapreduce.txt |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/3/artifact/yetus-general-check/output/diff-compile-javac-hbase-it.txt |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/3/artifact/yetus-general-check/output/diff-compile-javac-hbase-rest.txt |
   | checkstyle | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/3/artifact/yetus-general-check/output/diff-checkstyle-hbase-procedure.txt |
   | checkstyle | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/3/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt |
   | Max. process+thread count | 96 (vs. ulimit of 30000) |
   | modules | C: hbase-logging hbase-common hbase-metrics hbase-client hbase-zookeeper hbase-replication hbase-balancer hbase-http hbase-asyncfs hbase-procedure hbase-server hbase-mapreduce hbase-backup hbase-it hbase-rest U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/3/console |
   | versions | git=2.17.1 maven=3.6.3 spotbugs=4.2.2 |
   | Powered by | Apache Yetus 0.12.0 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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell commented on a change in pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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



##########
File path: hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestAvlUtil.java
##########
@@ -54,9 +55,8 @@ public void testAvlTreeCrud() {
     final TreeMap<Integer, Object> treeMap = new TreeMap<>();
     TestAvlNode root = null;
 
-    final Random rand = new Random();
     for (int i = 0; i < NELEM; ++i) {
-      int key = rand.nextInt(MAX_KEY);
+      int key = RNG.nextInt(MAX_KEY);

Review comment:
       I don't care really the objective is reuse of the Random object




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   I am going to split the Random changes into a separate JIRA and PR because that part has taken on a life of its own.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache9 commented on a change in pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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



##########
File path: hbase-it/src/test/java/org/apache/hadoop/hbase/TestIntegrationTestBase.java
##########
@@ -40,11 +40,10 @@ public void testMonkeyPropertiesParsing() {
     conf.set(MonkeyConstants.BATCH_RESTART_RS_RATIO, "0.85");
     conf.set(MonkeyConstants.MOVE_REGIONS_MAX_TIME, "60000");
     conf.set("hbase.rootdir", "/foo/bar/baz");
-
     final Properties props = new Properties();
-    IntegrationTestBase testBase = new IntegrationTestDDLMasterFailover();
     assertEquals(0, props.size());
-    testBase.loadMonkeyProperties(props, conf);
+    new IntegrationTestDDLMasterFailover();

Review comment:
       Then do we really need to create this instance? It has other side effects?




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   3m 53s |  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 13s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 25s |  master passed  |
   | +1 :green_heart: |  compile  |   6m 48s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   8m 17s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   5m 19s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 16s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 23s |  the patch passed  |
   | +1 :green_heart: |  compile  |   6m 48s |  the patch passed  |
   | +1 :green_heart: |  javac  |   6m 48s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   8m 14s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   5m 22s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   0m 15s |  hbase-logging in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 53s |  hbase-common in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 25s |  hbase-metrics in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 26s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 46s |  hbase-zookeeper in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 29s |  hbase-replication in the patch passed.  |
   | +1 :green_heart: |  unit  |   8m  3s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 46s |  hbase-http in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 27s |  hbase-asyncfs in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 45s |  hbase-procedure in the patch passed.  |
   | +1 :green_heart: |  unit  | 139m 13s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |  10m 46s |  hbase-mapreduce in the patch passed.  |
   | +1 :green_heart: |  unit  |   9m  5s |  hbase-backup in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 15s |  hbase-it in the patch passed.  |
   | +1 :green_heart: |  unit  |   3m 50s |  hbase-rest in the patch passed.  |
   |  |   | 240m 59s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/3/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/3936 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux aa39b54beca0 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8bca21b47d |
   | Default Java | AdoptOpenJDK-11.0.10+9 |
   |  Test Results | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/3/testReport/ |
   | Max. process+thread count | 5093 (vs. ulimit of 30000) |
   | modules | C: hbase-logging hbase-common hbase-metrics hbase-client hbase-zookeeper hbase-replication hbase-balancer hbase-http hbase-asyncfs hbase-procedure hbase-server hbase-mapreduce hbase-backup hbase-it hbase-rest U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/3/console |
   | versions | git=2.17.1 maven=3.6.3 |
   | Powered by | Apache Yetus 0.12.0 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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell edited a comment on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   > We could just use multiple PRs to get them in
   
   You want me to close this and open multiple PRs? How many PRs? How would you divide this? One PR per module? One PR per file? There are not THAT many changes here. I think it is not the hassle you describe.
   
   I would like to contribute spotbugs changes but it is hardly a priority relative to other things. This PR is ready. I hope it can be used. I do not plan to open multiple PRs for this. If that is a problem, feel free to just close this and resolve the JIRA. 


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 29s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  4s |  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 16s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 40s |  master passed  |
   | +1 :green_heart: |  compile  |   6m 51s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   8m 11s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   5m 27s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 16s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 30s |  the patch passed  |
   | +1 :green_heart: |  compile  |   6m 48s |  the patch passed  |
   | +1 :green_heart: |  javac  |   6m 48s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   8m 17s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   5m 22s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   0m 16s |  hbase-logging in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 55s |  hbase-common in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 25s |  hbase-metrics in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 26s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 47s |  hbase-zookeeper in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 29s |  hbase-replication in the patch passed.  |
   | +1 :green_heart: |  unit  |   8m  3s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 47s |  hbase-http in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 27s |  hbase-asyncfs in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 44s |  hbase-procedure in the patch passed.  |
   | +1 :green_heart: |  unit  | 139m 58s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |  10m 42s |  hbase-mapreduce in the patch passed.  |
   | +1 :green_heart: |  unit  |   9m 10s |  hbase-backup in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 15s |  hbase-it in the patch passed.  |
   | +1 :green_heart: |  unit  |   3m 47s |  hbase-rest in the patch passed.  |
   |  |   | 238m 48s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/3936 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 1f20a2142113 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8bca21b47d |
   | Default Java | AdoptOpenJDK-11.0.10+9 |
   |  Test Results | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/1/testReport/ |
   | Max. process+thread count | 5091 (vs. ulimit of 30000) |
   | modules | C: hbase-logging hbase-common hbase-metrics hbase-client hbase-zookeeper hbase-replication hbase-balancer hbase-http hbase-asyncfs hbase-procedure hbase-server hbase-mapreduce hbase-backup hbase-it hbase-rest U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/1/console |
   | versions | git=2.17.1 maven=3.6.3 |
   | Powered by | Apache Yetus 0.12.0 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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   Each module has its own commit in the PR branch @Apache9 . I think that is the best we can do as far as keeping each review item small. 


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 27s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  2s |  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 15s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m  7s |  master passed  |
   | +1 :green_heart: |  compile  |  11m 57s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   4m 57s |  master passed  |
   | +1 :green_heart: |  spotbugs  |  10m 48s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 14s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 57s |  the patch passed  |
   | +1 :green_heart: |  compile  |  11m 47s |  the patch passed  |
   | +1 :green_heart: |  javac  |   0m 18s |  hbase-logging in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 53s |  hbase-common in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 24s |  hbase-metrics in the patch passed.  |
   | +1 :green_heart: |  javac  |   1m  1s |  hbase-client generated 0 new + 121 unchanged - 1 fixed = 121 total (was 122)  |
   | +1 :green_heart: |  javac  |   0m 31s |  hbase-zookeeper in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 27s |  hbase-replication in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 34s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 31s |  hbase-http in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 29s |  hbase-asyncfs in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 34s |  hbase-procedure in the patch passed.  |
   | -0 :warning: |  javac  |   3m 11s |  hbase-server generated 1 new + 192 unchanged - 1 fixed = 193 total (was 193)  |
   | -0 :warning: |  javac  |   0m 48s |  hbase-mapreduce generated 1 new + 197 unchanged - 1 fixed = 198 total (was 198)  |
   | +1 :green_heart: |  javac  |   0m 40s |  hbase-backup in the patch passed.  |
   | -0 :warning: |  javac  |   0m 41s |  hbase-it generated 2 new + 101 unchanged - 2 fixed = 103 total (was 103)  |
   | -0 :warning: |  javac  |   0m 45s |  hbase-rest generated 1 new + 184 unchanged - 4 fixed = 185 total (was 188)  |
   | +1 :green_heart: |  checkstyle  |   0m 13s |  The patch passed checkstyle in hbase-logging  |
   | +1 :green_heart: |  checkstyle  |   0m 24s |  hbase-common: The patch generated 0 new + 0 unchanged - 2 fixed = 0 total (was 2)  |
   | +1 :green_heart: |  checkstyle  |   0m 11s |  The patch passed checkstyle in hbase-metrics  |
   | +1 :green_heart: |  checkstyle  |   0m 30s |  The patch passed checkstyle in hbase-client  |
   | +1 :green_heart: |  checkstyle  |   0m 13s |  The patch passed checkstyle in hbase-zookeeper  |
   | +1 :green_heart: |  checkstyle  |   0m 14s |  The patch passed checkstyle in hbase-replication  |
   | +1 :green_heart: |  checkstyle  |   0m 17s |  The patch passed checkstyle in hbase-balancer  |
   | +1 :green_heart: |  checkstyle  |   0m 14s |  The patch passed checkstyle in hbase-http  |
   | +1 :green_heart: |  checkstyle  |   0m 13s |  hbase-asyncfs: The patch generated 0 new + 0 unchanged - 1 fixed = 0 total (was 1)  |
   | -0 :warning: |  checkstyle  |   0m 16s |  hbase-procedure: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)  |
   | -0 :warning: |  checkstyle  |   1m 11s |  hbase-server: The patch generated 3 new + 498 unchanged - 10 fixed = 501 total (was 508)  |
   | +1 :green_heart: |  checkstyle  |   0m 22s |  hbase-mapreduce: The patch generated 0 new + 44 unchanged - 1 fixed = 44 total (was 45)  |
   | +1 :green_heart: |  checkstyle  |   0m 17s |  The patch passed checkstyle in hbase-backup  |
   | +1 :green_heart: |  checkstyle  |   0m 17s |  The patch passed checkstyle in hbase-it  |
   | +1 :green_heart: |  checkstyle  |   0m 17s |  The patch passed checkstyle in hbase-rest  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  hadoopcheck  |  24m 32s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.  |
   | +1 :green_heart: |  spotbugs  |  17m  1s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   3m 14s |  The patch does not generate ASF License warnings.  |
   |  |   | 114m  8s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/3936 |
   | Optional Tests | dupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile |
   | uname | Linux 4154a3dd67d4 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8bca21b47d |
   | Default Java | AdoptOpenJDK-1.8.0_282-b08 |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/artifact/yetus-general-check/output/diff-compile-javac-hbase-server.txt |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/artifact/yetus-general-check/output/diff-compile-javac-hbase-mapreduce.txt |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/artifact/yetus-general-check/output/diff-compile-javac-hbase-it.txt |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/artifact/yetus-general-check/output/diff-compile-javac-hbase-rest.txt |
   | checkstyle | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/artifact/yetus-general-check/output/diff-checkstyle-hbase-procedure.txt |
   | checkstyle | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt |
   | Max. process+thread count | 96 (vs. ulimit of 30000) |
   | modules | C: hbase-logging hbase-common hbase-metrics hbase-client hbase-zookeeper hbase-replication hbase-balancer hbase-http hbase-asyncfs hbase-procedure hbase-server hbase-mapreduce hbase-backup hbase-it hbase-rest U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/console |
   | versions | git=2.17.1 maven=3.6.3 spotbugs=4.2.2 |
   | Powered by | Apache Yetus 0.12.0 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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell commented on a change in pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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



##########
File path: hbase-it/src/test/java/org/apache/hadoop/hbase/TestIntegrationTestBase.java
##########
@@ -40,11 +40,10 @@ public void testMonkeyPropertiesParsing() {
     conf.set(MonkeyConstants.BATCH_RESTART_RS_RATIO, "0.85");
     conf.set(MonkeyConstants.MOVE_REGIONS_MAX_TIME, "60000");
     conf.set("hbase.rootdir", "/foo/bar/baz");
-
     final Properties props = new Properties();
-    IntegrationTestBase testBase = new IntegrationTestDDLMasterFailover();
     assertEquals(0, props.size());
-    testBase.loadMonkeyProperties(props, conf);
+    new IntegrationTestDDLMasterFailover();

Review comment:
       Because the assignment is flagged as a dead store. This code still works. The constructor is called. The warning about a dead store is avoided. It is a trivial issue and I don't care much either way. 




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   Fix LoadTestKVGenerator related failures. 


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache9 commented on a change in pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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



##########
File path: hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestCoprocessorDescriptor.java
##########
@@ -71,7 +67,11 @@ public void testSetCoprocessor() throws IOException {
     List<CoprocessorDescriptor> cps = new ArrayList<>();
     for (String className : Arrays.asList("className0", "className1", "className2")) {
       String path = "path";
-      int priority = Math.abs(className.hashCode());
+      // Ensure priority is a positive integer
+      int priority = className.hashCode();
+      if (priority < 0) {
+        priority = -priority;

Review comment:
       The main problem is not Math.abs, is INT_MIN. As the absolute value of INT_MIN is greater than INT_MAX, there is no positive int value can represent the absolute value of INT_MIN... You could try the piece of code here, let priority to be INT_MIN, you will still get a INT_MIN with -priority...




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   :broken_heart: **-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 16s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 33s |  master passed  |
   | +1 :green_heart: |  compile  |   4m 52s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   9m 40s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   3m 44s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 18s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 36s |  the patch passed  |
   | +1 :green_heart: |  compile  |   4m 48s |  the patch passed  |
   | +1 :green_heart: |  javac  |   4m 48s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   9m  9s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   3m 25s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   0m 15s |  hbase-logging in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 58s |  hbase-common in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 22s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  |   8m 17s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 54s |  hbase-http in the patch passed.  |
   | +1 :green_heart: |  unit  |   2m  2s |  hbase-procedure in the patch passed.  |
   | -1 :x: |  unit  | 153m 40s |  hbase-server in the patch failed.  |
   | +1 :green_heart: |  unit  |  11m  9s |  hbase-mapreduce in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 16s |  hbase-it in the patch passed.  |
   | +1 :green_heart: |  unit  |   4m  2s |  hbase-rest in the patch passed.  |
   |  |   | 235m 12s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/4/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/3936 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux e76d01e11dd7 4.15.0-156-generic #163-Ubuntu SMP Thu Aug 19 23:31:58 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8f5a12f794 |
   | Default Java | AdoptOpenJDK-1.8.0_282-b08 |
   | unit | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/4/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt |
   |  Test Results | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/4/testReport/ |
   | Max. process+thread count | 4538 (vs. ulimit of 30000) |
   | modules | C: hbase-logging hbase-common hbase-client hbase-balancer hbase-http hbase-procedure hbase-server hbase-mapreduce hbase-it hbase-rest U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/4/console |
   | versions | git=2.17.1 maven=3.6.3 |
   | Powered by | Apache Yetus 0.12.0 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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache9 commented on a change in pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/PerClientRandomNonceGenerator.java
##########
@@ -32,13 +32,14 @@
 public final class PerClientRandomNonceGenerator implements NonceGenerator {
 
   private static final PerClientRandomNonceGenerator INST = new PerClientRandomNonceGenerator();
-
-  private final Random rdm = new Random();
   private final long clientId;
 
+  private Random rng;

Review comment:
       I would say let's just use ThreadLocalRandom, unless SecureRandom is required, then we could create a static SecureRandom instance and use 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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell commented on a change in pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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



##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/PerClientRandomNonceGenerator.java
##########
@@ -32,13 +32,14 @@
 public final class PerClientRandomNonceGenerator implements NonceGenerator {
 
   private static final PerClientRandomNonceGenerator INST = new PerClientRandomNonceGenerator();
-
-  private final Random rdm = new Random();
   private final long clientId;
 
+  private Random rng;

Review comment:
       Spotbugs wants you to allocate a Random object and reuse it as often as possible. This is because if you do not reuse Random, if you just do like so in a method
   
       Random r = new Random();
       // do something with 'r'
   
   the quality of the generated random numbers is poor.
   




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 30s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  4s |  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 17s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 17s |  master passed  |
   | +1 :green_heart: |  compile  |   6m 22s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   8m 15s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   4m 53s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 16s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 56s |  the patch passed  |
   | +1 :green_heart: |  compile  |   6m 25s |  the patch passed  |
   | +1 :green_heart: |  javac  |   6m 25s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   8m 14s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   4m 43s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   0m 14s |  hbase-logging in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 54s |  hbase-common in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 21s |  hbase-metrics in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 26s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 46s |  hbase-zookeeper in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 40s |  hbase-replication in the patch passed.  |
   | +1 :green_heart: |  unit  |   7m 10s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m  2s |  hbase-http in the patch passed.  |
   | +1 :green_heart: |  unit  |   2m  4s |  hbase-asyncfs in the patch passed.  |
   | +1 :green_heart: |  unit  |   2m 21s |  hbase-procedure in the patch passed.  |
   | +1 :green_heart: |  unit  | 174m 36s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  unit  |  12m 14s |  hbase-mapreduce in the patch passed.  |
   | +1 :green_heart: |  unit  |   9m 49s |  hbase-backup in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 20s |  hbase-it in the patch passed.  |
   | +1 :green_heart: |  unit  |   3m 49s |  hbase-rest in the patch passed.  |
   |  |   | 274m 26s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/3/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/3936 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 53699dc26689 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8bca21b47d |
   | Default Java | AdoptOpenJDK-1.8.0_282-b08 |
   |  Test Results | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/3/testReport/ |
   | Max. process+thread count | 4820 (vs. ulimit of 30000) |
   | modules | C: hbase-logging hbase-common hbase-metrics hbase-client hbase-zookeeper hbase-replication hbase-balancer hbase-http hbase-asyncfs hbase-procedure hbase-server hbase-mapreduce hbase-backup hbase-it hbase-rest U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/3/console |
   | versions | git=2.17.1 maven=3.6.3 |
   | Powered by | Apache Yetus 0.12.0 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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache9 commented on a change in pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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



##########
File path: hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestCoprocessorDescriptor.java
##########
@@ -71,7 +67,11 @@ public void testSetCoprocessor() throws IOException {
     List<CoprocessorDescriptor> cps = new ArrayList<>();
     for (String className : Arrays.asList("className0", "className1", "className2")) {
       String path = "path";
-      int priority = Math.abs(className.hashCode());
+      // Ensure priority is a positive integer
+      int priority = className.hashCode();
+      if (priority < 0) {
+        priority = -priority;

Review comment:
       This is not the correct fix... You are just repeating the implementation of Math.abs here...
   
   If priority is Integer.MIN_VALUE, then -priority will still be Integer.MIN_VALUE...

##########
File path: hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestAvlUtil.java
##########
@@ -54,9 +55,8 @@ public void testAvlTreeCrud() {
     final TreeMap<Integer, Object> treeMap = new TreeMap<>();
     TestAvlNode root = null;
 
-    final Random rand = new Random();
     for (int i = 0; i < NELEM; ++i) {
-      int key = rand.nextInt(MAX_KEY);
+      int key = RNG.nextInt(MAX_KEY);

Review comment:
       Ditto, since we do not have a fixed seed here, let's just use ThreadLocalRandom.

##########
File path: hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java
##########
@@ -373,7 +375,11 @@ public void close() throws IOException {
       taskId = taskId + iteration * numMapTasks;
       numMapTasks = numMapTasks * numIterations;
 
-      long chainId = Math.abs(new Random().nextLong());
+      // ensure chainId is positive
+      long chainId = RNG.nextLong();
+      if (chainId < 0) {

Review comment:
       Ditto, not the correct way for fixing the abs problem...

##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/PerClientRandomNonceGenerator.java
##########
@@ -32,13 +32,14 @@
 public final class PerClientRandomNonceGenerator implements NonceGenerator {
 
   private static final PerClientRandomNonceGenerator INST = new PerClientRandomNonceGenerator();
-
-  private final Random rdm = new Random();
   private final long clientId;
 
+  private Random rng;

Review comment:
       I do not see any real differences here? What is the spotbugs issue here?

##########
File path: hbase-common/src/test/java/org/apache/hadoop/hbase/io/util/TestLRUDictionary.java
##########
@@ -81,9 +83,8 @@ public void testPassingSameArrayToAddEntry() {
 
   @Test
   public void testBasic() {
-    Random rand = new Random();
     byte[] testBytes = new byte[10];
-    rand.nextBytes(testBytes);
+    RNG.nextBytes(testBytes);

Review comment:
       What is the real gain here? We just the the random once, and I suggest that we just use ThreadLocalRandom instead...

##########
File path: hbase-it/src/test/java/org/apache/hadoop/hbase/TestIntegrationTestBase.java
##########
@@ -40,11 +40,10 @@ public void testMonkeyPropertiesParsing() {
     conf.set(MonkeyConstants.BATCH_RESTART_RS_RATIO, "0.85");
     conf.set(MonkeyConstants.MOVE_REGIONS_MAX_TIME, "60000");
     conf.set("hbase.rootdir", "/foo/bar/baz");
-
     final Properties props = new Properties();
-    IntegrationTestBase testBase = new IntegrationTestDDLMasterFailover();
     assertEquals(0, props.size());
-    testBase.loadMonkeyProperties(props, conf);
+    new IntegrationTestDDLMasterFailover();

Review comment:
       Why a new without assignment?




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell commented on a change in pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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



##########
File path: hbase-it/src/test/java/org/apache/hadoop/hbase/TestIntegrationTestBase.java
##########
@@ -40,11 +40,10 @@ public void testMonkeyPropertiesParsing() {
     conf.set(MonkeyConstants.BATCH_RESTART_RS_RATIO, "0.85");
     conf.set(MonkeyConstants.MOVE_REGIONS_MAX_TIME, "60000");
     conf.set("hbase.rootdir", "/foo/bar/baz");
-
     final Properties props = new Properties();
-    IntegrationTestBase testBase = new IntegrationTestDDLMasterFailover();
     assertEquals(0, props.size());
-    testBase.loadMonkeyProperties(props, conf);
+    new IntegrationTestDDLMasterFailover();

Review comment:
       Because the assignment is flagged as a dead store. 




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell commented on a change in pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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



##########
File path: hbase-common/src/test/java/org/apache/hadoop/hbase/io/util/TestLRUDictionary.java
##########
@@ -81,9 +83,8 @@ public void testPassingSameArrayToAddEntry() {
 
   @Test
   public void testBasic() {
-    Random rand = new Random();
     byte[] testBytes = new byte[10];
-    rand.nextBytes(testBytes);
+    RNG.nextBytes(testBytes);

Review comment:
       Spotbugs wants you to allocate a Random object and reuse it as often as possible. This is because if you do not reuse Random, if you just do like so in a method
   
       Random r = new Random();
       // do something with 'r'
   
   the quality of the generated random numbers is poor. 




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell edited a comment on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   > We could just use multiple PRs to get them in
   
   You want me to close this and open multiple PRs? How many PRs? How would you divide this? One PR per module? One PR per file?
   
   I would like to contribute spotbugs changes but it is hardly a priority relative to other things. This PR is ready. I hope it can be used. I do not plan to open multiple PRs for this. If that is a problem, feel free to just close this and resolve the JIRA. 


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell commented on a change in pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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



##########
File path: hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java
##########
@@ -373,7 +375,11 @@ public void close() throws IOException {
       taskId = taskId + iteration * numMapTasks;
       numMapTasks = numMapTasks * numIterations;
 
-      long chainId = Math.abs(new Random().nextLong());
+      // ensure chainId is positive
+      long chainId = RNG.nextLong();
+      if (chainId < 0) {

Review comment:
       Ack




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 27s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  1s |  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 20s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 53s |  master passed  |
   | +1 :green_heart: |  compile  |   9m  7s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   3m 53s |  master passed  |
   | +1 :green_heart: |  spotbugs  |   7m 46s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 15s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 53s |  the patch passed  |
   | +1 :green_heart: |  compile  |   9m  3s |  the patch passed  |
   | +1 :green_heart: |  javac  |   0m 19s |  hbase-logging in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 50s |  hbase-common in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 56s |  hbase-client generated 0 new + 121 unchanged - 1 fixed = 121 total (was 122)  |
   | +1 :green_heart: |  javac  |   0m 33s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 32s |  hbase-http in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 33s |  hbase-procedure in the patch passed.  |
   | -0 :warning: |  javac  |   3m 11s |  hbase-server generated 1 new + 192 unchanged - 1 fixed = 193 total (was 193)  |
   | -0 :warning: |  javac  |   0m 47s |  hbase-mapreduce generated 1 new + 197 unchanged - 1 fixed = 198 total (was 198)  |
   | +1 :green_heart: |  javac  |   0m 42s |  hbase-it in the patch passed.  |
   | -0 :warning: |  javac  |   0m 40s |  hbase-rest generated 1 new + 184 unchanged - 4 fixed = 185 total (was 188)  |
   | +1 :green_heart: |  checkstyle  |   0m 12s |  The patch passed checkstyle in hbase-logging  |
   | +1 :green_heart: |  checkstyle  |   0m 25s |  The patch passed checkstyle in hbase-common  |
   | +1 :green_heart: |  checkstyle  |   0m 27s |  hbase-client: The patch generated 0 new + 0 unchanged - 4 fixed = 0 total (was 4)  |
   | +1 :green_heart: |  checkstyle  |   0m 16s |  The patch passed checkstyle in hbase-balancer  |
   | +1 :green_heart: |  checkstyle  |   0m 15s |  The patch passed checkstyle in hbase-http  |
   | -0 :warning: |  checkstyle  |   0m 15s |  hbase-procedure: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)  |
   | +1 :green_heart: |  checkstyle  |   1m 10s |  The patch passed checkstyle in hbase-server  |
   | +1 :green_heart: |  checkstyle  |   0m 19s |  The patch passed checkstyle in hbase-mapreduce  |
   | +1 :green_heart: |  checkstyle  |   0m 18s |  The patch passed checkstyle in hbase-it  |
   | +1 :green_heart: |  checkstyle  |   0m 17s |  The patch passed checkstyle in hbase-rest  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  hadoopcheck  |  19m 13s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.  |
   | +1 :green_heart: |  spotbugs  |   9m 40s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   2m  9s |  The patch does not generate ASF License warnings.  |
   |  |   |  84m 48s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/4/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/3936 |
   | Optional Tests | dupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile |
   | uname | Linux 1a1cd58b5fcd 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8f5a12f794 |
   | Default Java | AdoptOpenJDK-1.8.0_282-b08 |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/4/artifact/yetus-general-check/output/diff-compile-javac-hbase-server.txt |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/4/artifact/yetus-general-check/output/diff-compile-javac-hbase-mapreduce.txt |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/4/artifact/yetus-general-check/output/diff-compile-javac-hbase-rest.txt |
   | checkstyle | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/4/artifact/yetus-general-check/output/diff-checkstyle-hbase-procedure.txt |
   | Max. process+thread count | 97 (vs. ulimit of 30000) |
   | modules | C: hbase-logging hbase-common hbase-client hbase-balancer hbase-http hbase-procedure hbase-server hbase-mapreduce hbase-it hbase-rest U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/4/console |
   | versions | git=2.17.1 maven=3.6.3 spotbugs=4.2.2 |
   | Powered by | Apache Yetus 0.12.0 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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   > We could just use multiple PRs to get them in
   
   We already have this one open. Each change is not difficult to understand individually. Let's use this one to finish this. 
   
   It is not important enough for me to make a PR for each module. Too much work. If that is a problem, feel free to just close this and resolve the JIRA. 


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 27s |  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 18s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   6m 16s |  master passed  |
   | +1 :green_heart: |  compile  |   5m 53s |  master passed  |
   | +1 :green_heart: |  shadedjars  |  10m  2s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   4m 17s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 16s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   5m 54s |  the patch passed  |
   | +1 :green_heart: |  compile  |   5m 41s |  the patch passed  |
   | +1 :green_heart: |  javac  |   5m 41s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |  10m  4s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   3m 56s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   0m 14s |  hbase-logging in the patch passed.  |
   | +1 :green_heart: |  unit  |   2m 19s |  hbase-common in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 50s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  |  12m 43s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m  1s |  hbase-http in the patch passed.  |
   | +1 :green_heart: |  unit  |   2m  5s |  hbase-procedure in the patch passed.  |
   | -1 :x: |  unit  | 211m 38s |  hbase-server in the patch failed.  |
   | +1 :green_heart: |  unit  |  14m 23s |  hbase-mapreduce in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m  8s |  hbase-it in the patch passed.  |
   | +1 :green_heart: |  unit  |   3m 48s |  hbase-rest in the patch passed.  |
   |  |   | 309m 22s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/4/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/3936 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 21635a06a1ec 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8f5a12f794 |
   | Default Java | AdoptOpenJDK-11.0.10+9 |
   | unit | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/4/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt |
   |  Test Results | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/4/testReport/ |
   | Max. process+thread count | 3327 (vs. ulimit of 30000) |
   | modules | C: hbase-logging hbase-common hbase-client hbase-balancer hbase-http hbase-procedure hbase-server hbase-mapreduce hbase-it hbase-rest U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/4/console |
   | versions | git=2.17.1 maven=3.6.3 |
   | Powered by | Apache Yetus 0.12.0 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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell commented on a change in pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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



##########
File path: hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java
##########
@@ -373,7 +375,11 @@ public void close() throws IOException {
       taskId = taskId + iteration * numMapTasks;
       numMapTasks = numMapTasks * numIterations;
 
-      long chainId = Math.abs(new Random().nextLong());
+      // ensure chainId is positive
+      long chainId = RNG.nextLong();
+      if (chainId < 0) {

Review comment:
       As explained by the help text for the spotbugs finding the issue is Math.abs(INT_MIN) can return INT_MIN. So if ABS is supposed to ensure a positive number, it will not always do so. The fix is to change the sign of the value if it is negative and should not be negative. 




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell commented on a change in pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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



##########
File path: hbase-common/src/test/java/org/apache/hadoop/hbase/io/util/TestLRUDictionary.java
##########
@@ -81,9 +83,8 @@ public void testPassingSameArrayToAddEntry() {
 
   @Test
   public void testBasic() {
-    Random rand = new Random();
     byte[] testBytes = new byte[10];
-    rand.nextBytes(testBytes);
+    RNG.nextBytes(testBytes);

Review comment:
       Sure, let's use ThreadLocalRandom.current() instead of the static Random instance. 




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 32s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  4s |  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 16s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 57s |  master passed  |
   | +1 :green_heart: |  compile  |   6m 22s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   8m 22s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   4m 47s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 17s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 14s |  the patch passed  |
   | +1 :green_heart: |  compile  |   6m 15s |  the patch passed  |
   | +1 :green_heart: |  javac  |   6m 15s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   8m 25s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   4m 36s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   0m 16s |  hbase-logging in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 59s |  hbase-common in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 23s |  hbase-metrics in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 23s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 47s |  hbase-zookeeper in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 28s |  hbase-replication in the patch passed.  |
   | +1 :green_heart: |  unit  |   8m 10s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 44s |  hbase-http in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 24s |  hbase-asyncfs in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 51s |  hbase-procedure in the patch passed.  |
   | -1 :x: |  unit  | 173m 19s |  hbase-server in the patch failed.  |
   | +1 :green_heart: |  unit  |  13m 48s |  hbase-mapreduce in the patch passed.  |
   | +1 :green_heart: |  unit  |  11m  4s |  hbase-backup in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 21s |  hbase-it in the patch passed.  |
   | +1 :green_heart: |  unit  |   4m 17s |  hbase-rest in the patch passed.  |
   |  |   | 274m 34s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/3936 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 0582bfb2c0cf 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 / 8bca21b47d |
   | Default Java | AdoptOpenJDK-1.8.0_282-b08 |
   | unit | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt |
   |  Test Results | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/testReport/ |
   | Max. process+thread count | 4845 (vs. ulimit of 30000) |
   | modules | C: hbase-logging hbase-common hbase-metrics hbase-client hbase-zookeeper hbase-replication hbase-balancer hbase-http hbase-asyncfs hbase-procedure hbase-server hbase-mapreduce hbase-backup hbase-it hbase-rest U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/console |
   | versions | git=2.17.1 maven=3.6.3 |
   | Powered by | Apache Yetus 0.12.0 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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 33s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  4s |  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 15s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 51s |  master passed  |
   | +1 :green_heart: |  compile  |   7m  9s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   8m 32s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   5m 45s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 16s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 41s |  the patch passed  |
   | +1 :green_heart: |  compile  |   7m  0s |  the patch passed  |
   | +1 :green_heart: |  javac  |   7m  0s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   8m 38s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   5m 45s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   0m 15s |  hbase-logging in the patch passed.  |
   | +1 :green_heart: |  unit  |   2m 19s |  hbase-common in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 22s |  hbase-metrics in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 30s |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 43s |  hbase-zookeeper in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 26s |  hbase-replication in the patch passed.  |
   | +1 :green_heart: |  unit  |   8m  3s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 56s |  hbase-http in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 40s |  hbase-asyncfs in the patch passed.  |
   | +1 :green_heart: |  unit  |   2m  0s |  hbase-procedure in the patch passed.  |
   | -1 :x: |  unit  | 160m 58s |  hbase-server in the patch failed.  |
   | +1 :green_heart: |  unit  |  12m 28s |  hbase-mapreduce in the patch passed.  |
   | +1 :green_heart: |  unit  |  10m 28s |  hbase-backup in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 22s |  hbase-it in the patch passed.  |
   | +1 :green_heart: |  unit  |   3m 52s |  hbase-rest in the patch passed.  |
   |  |   | 266m  0s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/3936 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 42a7f172901a 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 / 8bca21b47d |
   | Default Java | AdoptOpenJDK-11.0.10+9 |
   | unit | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt |
   |  Test Results | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/testReport/ |
   | Max. process+thread count | 4916 (vs. ulimit of 30000) |
   | modules | C: hbase-logging hbase-common hbase-metrics hbase-client hbase-zookeeper hbase-replication hbase-balancer hbase-http hbase-asyncfs hbase-procedure hbase-server hbase-mapreduce hbase-backup hbase-it hbase-rest U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/2/console |
   | versions | git=2.17.1 maven=3.6.3 |
   | Powered by | Apache Yetus 0.12.0 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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell edited a comment on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   I am going to split the Random changes into a separate JIRA and PR because that part has taken on a life of its own.
   
   Edit: It is HBASE-26582


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 26s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  3s |  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 16s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m  6s |  master passed  |
   | +1 :green_heart: |  compile  |  11m 33s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   5m 15s |  master passed  |
   | +1 :green_heart: |  spotbugs  |  10m 27s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 15s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 49s |  the patch passed  |
   | +1 :green_heart: |  compile  |  11m 29s |  the patch passed  |
   | +1 :green_heart: |  javac  |   0m 20s |  hbase-logging in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 50s |  hbase-common in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 25s |  hbase-metrics in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 55s |  hbase-client generated 0 new + 121 unchanged - 1 fixed = 121 total (was 122)  |
   | +1 :green_heart: |  javac  |   0m 30s |  hbase-zookeeper in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 26s |  hbase-replication in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 32s |  hbase-balancer in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 31s |  hbase-http in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 29s |  hbase-asyncfs in the patch passed.  |
   | +1 :green_heart: |  javac  |   0m 34s |  hbase-procedure in the patch passed.  |
   | -0 :warning: |  javac  |   3m  7s |  hbase-server generated 1 new + 192 unchanged - 1 fixed = 193 total (was 193)  |
   | -0 :warning: |  javac  |   0m 48s |  hbase-mapreduce generated 1 new + 197 unchanged - 1 fixed = 198 total (was 198)  |
   | +1 :green_heart: |  javac  |   0m 38s |  hbase-backup in the patch passed.  |
   | -0 :warning: |  javac  |   0m 41s |  hbase-it generated 2 new + 101 unchanged - 2 fixed = 103 total (was 103)  |
   | -0 :warning: |  javac  |   0m 43s |  hbase-rest generated 1 new + 184 unchanged - 4 fixed = 185 total (was 188)  |
   | +1 :green_heart: |  checkstyle  |   0m 12s |  The patch passed checkstyle in hbase-logging  |
   | +1 :green_heart: |  checkstyle  |   0m 25s |  hbase-common: The patch generated 0 new + 0 unchanged - 2 fixed = 0 total (was 2)  |
   | +1 :green_heart: |  checkstyle  |   0m 12s |  The patch passed checkstyle in hbase-metrics  |
   | +1 :green_heart: |  checkstyle  |   0m 29s |  The patch passed checkstyle in hbase-client  |
   | +1 :green_heart: |  checkstyle  |   0m 15s |  The patch passed checkstyle in hbase-zookeeper  |
   | +1 :green_heart: |  checkstyle  |   0m 13s |  The patch passed checkstyle in hbase-replication  |
   | +1 :green_heart: |  checkstyle  |   0m 16s |  The patch passed checkstyle in hbase-balancer  |
   | +1 :green_heart: |  checkstyle  |   0m 15s |  The patch passed checkstyle in hbase-http  |
   | +1 :green_heart: |  checkstyle  |   0m 13s |  hbase-asyncfs: The patch generated 0 new + 0 unchanged - 1 fixed = 0 total (was 1)  |
   | -0 :warning: |  checkstyle  |   0m 16s |  hbase-procedure: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)  |
   | -0 :warning: |  checkstyle  |   1m 16s |  hbase-server: The patch generated 3 new + 498 unchanged - 10 fixed = 501 total (was 508)  |
   | +1 :green_heart: |  checkstyle  |   0m 21s |  hbase-mapreduce: The patch generated 0 new + 44 unchanged - 1 fixed = 44 total (was 45)  |
   | +1 :green_heart: |  checkstyle  |   0m 16s |  The patch passed checkstyle in hbase-backup  |
   | +1 :green_heart: |  checkstyle  |   0m 19s |  The patch passed checkstyle in hbase-it  |
   | +1 :green_heart: |  checkstyle  |   0m 17s |  The patch passed checkstyle in hbase-rest  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  hadoopcheck  |  19m 24s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.  |
   | +1 :green_heart: |  spotbugs  |  13m 24s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   3m 13s |  The patch does not generate ASF License warnings.  |
   |  |   | 101m 48s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/1/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/3936 |
   | Optional Tests | dupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile |
   | uname | Linux 512e0b9b8715 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/hbase-personality.sh |
   | git revision | master / 8bca21b47d |
   | Default Java | AdoptOpenJDK-1.8.0_282-b08 |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/1/artifact/yetus-general-check/output/diff-compile-javac-hbase-server.txt |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/1/artifact/yetus-general-check/output/diff-compile-javac-hbase-mapreduce.txt |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/1/artifact/yetus-general-check/output/diff-compile-javac-hbase-it.txt |
   | javac | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/1/artifact/yetus-general-check/output/diff-compile-javac-hbase-rest.txt |
   | checkstyle | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-procedure.txt |
   | checkstyle | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt |
   | Max. process+thread count | 96 (vs. ulimit of 30000) |
   | modules | C: hbase-logging hbase-common hbase-metrics hbase-client hbase-zookeeper hbase-replication hbase-balancer hbase-http hbase-asyncfs hbase-procedure hbase-server hbase-mapreduce hbase-backup hbase-it hbase-rest U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3936/1/console |
   | versions | git=2.17.1 maven=3.6.3 spotbugs=4.2.2 |
   | Powered by | Apache Yetus 0.12.0 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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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






-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell commented on a change in pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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



##########
File path: hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestCoprocessorDescriptor.java
##########
@@ -71,7 +67,11 @@ public void testSetCoprocessor() throws IOException {
     List<CoprocessorDescriptor> cps = new ArrayList<>();
     for (String className : Arrays.asList("className0", "className1", "className2")) {
       String path = "path";
-      int priority = Math.abs(className.hashCode());
+      // Ensure priority is a positive integer
+      int priority = className.hashCode();
+      if (priority < 0) {
+        priority = -priority;

Review comment:
       Thanks for pointing that out. As explained by the help text for the spotbugs finding the issue is Math.abs(INT_MIN) can return INT_MIN. So if ABS is supposed to ensure a positive number, it will not always do so. The fix is to change the sign of the value if it is negative and should not be negative. Needs more here, then.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache9 commented on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   > Each module has its own commit in the PR branch @Apache9 . I think that is the best we can do as far as keeping each review item small.
   > 
   > In other words
   > 
   > I am aware the patch is big over all.
   > 
   > So there are multiple commits on this PR. Find them here: https://github.com/apache/hbase/pull/3936/commits
   > 
   > Each commit has the changes just for one maven module.
   
   We could just use multiple PRs to get them in? A problem for a big PR is that, we could have a lot of small nits every time when reviewing, on different part of the big PR, then we can not land the whole PR, which will lead to a very long review time and easy to introduce conflicts with other commits...


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] apurtell edited a comment on pull request #3936: HBASE-26555 Fix findbugs/spotbugs findings

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


   > We could just use multiple PRs to get them in
   
   You want me to close this and open multiple PRs? How many PRs? How would you divide this? One PR per module? One PR per file? There are not THAT many changes here. I think it is not the hassle you describe. I would like to contribute spotbugs changes but it is hardly a priority relative to other things. This PR is ready. I hope it can be used. I do not plan to open multiple PRs for this. If that is a problem, feel free to just close this and resolve the JIRA. 


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org