Skip to content

HBASE-28927 Fix spotbugs issues introduced by refactoring to hbase-di… - #6384

Merged
NihalJain merged 4 commits into
apache:masterfrom
NihalJain:HBASE-28927
Oct 23, 2024
Merged

HBASE-28927 Fix spotbugs issues introduced by refactoring to hbase-di…#6384
NihalJain merged 4 commits into
apache:masterfrom
NihalJain:HBASE-28927

Conversation

@NihalJain

Copy link
Copy Markdown
Contributor

…agnostics with HBASE-28432

@@ -249,6 +249,17 @@ public String toString() {
public int compareTo(RunResult o) {

@NihalJainNihalJainOct 22, 2024

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue list for quick ref, lets see how many gets fixed with 1st commit:

ReasonTests
SpotBugsmodule:hbase-server
Random object created and used only once in org.apache.hadoop.hbase.util.LoadTestKVGenerator.getValueForRowColumn(int, byte[][]) At LoadTestKVGenerator.java:only once in org.apache.hadoop.hbase.util.LoadTestKVGenerator.getValueForRowColumn(int, byte[][]) At LoadTestKVGenerator.java:[line 111]
SpotBugsmodule:root
Integral division result cast to double or float in org.apache.hadoop.hbase.PerformanceEvaluation.calculateRowsAndSize(PerformanceEvaluation$TestOptions) At PerformanceEvaluation.java:double or float in org.apache.hadoop.hbase.PerformanceEvaluation.calculateRowsAndSize(PerformanceEvaluation$TestOptions) At PerformanceEvaluation.java:[line 3154]
org.apache.hadoop.hbase.PerformanceEvaluation$RunResult defines compareTo(PerformanceEvaluation$RunResult) and uses Object.equals() At PerformanceEvaluation.java:Object.equals() At PerformanceEvaluation.java:[line 250]
Random object created and used only once in org.apache.hadoop.hbase.util.LoadTestKVGenerator.getValueForRowColumn(int, byte[][]) At LoadTestKVGenerator.java:only once in org.apache.hadoop.hbase.util.LoadTestKVGenerator.getValueForRowColumn(int, byte[][]) At LoadTestKVGenerator.java:[line 111]
org.apache.hadoop.hbase.util.LoadTestTool.DEFAULT_NUM_REGIONS_PER_SERVER isn't final but should be At LoadTestTool.java:be At LoadTestTool.java:[line 167]
org.apache.hadoop.hbase.util.MultiThreadedAction.verifyResultAgainstDataGenerator(Result, boolean, boolean) concatenates strings using + in a loop At MultiThreadedAction.java:using + in a loop At MultiThreadedAction.java:[line 415]
Integral division result cast to double or float in org.apache.hadoop.hbase.util.MultiThreadedAction$ProgressReporter.run() At MultiThreadedAction.java:double or float in org.apache.hadoop.hbase.util.MultiThreadedAction$ProgressReporter.run() At MultiThreadedAction.java:[line 206]
org.apache.hadoop.hbase.util.MultiThreadedReader$HBaseReaderThread.createGet(long) concatenates strings using + in a loop At MultiThreadedReader.java:in a loop At MultiThreadedReader.java:[line 318]
Dead store to rowKey in org.apache.hadoop.hbase.util.MultiThreadedReaderWithACL$HBaseReaderThreadWithACL.queryKey(Get, boolean, long) At MultiThreadedReaderWithACL.java:org.apache.hadoop.hbase.util.MultiThreadedReaderWithACL$HBaseReaderThreadWithACL.queryKey(Get, boolean, long) At MultiThreadedReaderWithACL.java:[line 91]
Inconsistent synchronization of org.apache.hadoop.hbase.util.MultiThreadedUpdater.writer; locked 75% of time Unsynchronized access at MultiThreadedUpdater.java:75% of time Unsynchronized access at MultiThreadedUpdater.java:[line 80]
Unwritten field:MultiThreadedUpdaterWithACL.java:[line 94]
Exception is caught when Exception is not thrown in org.apache.hadoop.hbase.wal.WALPerformanceEvaluation.run(String[]) At WALPerformanceEvaluation.java:is not thrown in org.apache.hadoop.hbase.wal.WALPerformanceEvaluation.run(String[]) At WALPerformanceEvaluation.java:[line 244]
Format string should use %n rather than n in org.apache.hadoop.hbase.wal.WALPerformanceEvaluation.printUsageAndExit() At WALPerformanceEvaluation.java:rather than n in org.apache.hadoop.hbase.wal.WALPerformanceEvaluation.printUsageAndExit() At WALPerformanceEvaluation.java:[line 414]
Exception is caught when Exception is not thrown in org.apache.hadoop.hbase.wal.WALPerformanceEvaluation$WALPutBenchmark.run() At WALPerformanceEvaluation.java:is not thrown in org.apache.hadoop.hbase.wal.WALPerformanceEvaluation$WALPutBenchmark.run() At WALPerformanceEvaluation.java:[line 171]

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@NihalJain

Copy link
Copy Markdown
ContributorAuthor

All issues are fixed now. Could you please review? @stoty@ndimiduk

@stotystoty left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The random changes do not make sense, and are a potential perf hit.

@stotystoty left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 LGTM

@NihalJain

NihalJain commented Oct 22, 2024

Copy link
Copy Markdown
ContributorAuthor

+1 LGTM

Than you @stoty for the quick review :)
Will wait for all build stages to complete and then merge this.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 26sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
_ master Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for branch
+1 💚mvninstall2m 54smaster passed
+1 💚compile3m 29smaster passed
+1 💚checkstyle0m 44smaster passed
-1 ❌spotbugs1m 31s/branch-spotbugs-hbase-server-warnings.htmlhbase-server in master has 1 extant spotbugs warnings.
-1 ❌spotbugs0m 26s/branch-spotbugs-hbase-diagnostics-warnings.htmlhbase-diagnostics in master has 12 extant spotbugs warnings.
-1 ❌spotless0m 43sbranch has 1 errors when running spotless:check, run spotless:apply to fix.
_ Patch Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for patch
+1 💚mvninstall2m 51sthe patch passed
+1 💚compile3m 30sthe patch passed
-0 ⚠️javac0m 25s/results-compile-javac-hbase-diagnostics.txthbase-diagnostics generated 1 new + 55 unchanged - 5 fixed = 56 total (was 60)
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 36sThe patch passed checkstyle in hbase-server
+1 💚checkstyle0m 8shbase-diagnostics: The patch generated 0 new + 43 unchanged - 1 fixed = 43 total (was 44)
+1 💚spotbugs1m 38shbase-server generated 0 new + 0 unchanged - 1 fixed = 0 total (was 1)
+1 💚spotbugs0m 34shbase-diagnostics generated 0 new + 0 unchanged - 12 fixed = 0 total (was 12)
+1 💚hadoopcheck10m 43sPatch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚spotless0m 43spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 16sThe patch does not generate ASF License warnings.
38m 40s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6384/4/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#6384
Optional Testsdupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
unameLinux 32d9b25c584e 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / e8e2715
Default JavaEclipse Adoptium-17.0.11+9
spotlesshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6384/4/artifact/yetus-general-check/output/branch-spotless.txt
Max. process+thread count86 (vs. ulimit of 30000)
modulesC: hbase-server hbase-diagnostics U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6384/4/console
versionsgit=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 37sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗mvndep0m 16sMaven dependency ordering for branch
+1 💚mvninstall3m 24smaster passed
+1 💚compile1m 20smaster passed
+1 💚javadoc0m 47smaster passed
+1 💚shadedjars6m 12sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 11sMaven dependency ordering for patch
+1 💚mvninstall3m 29sthe patch passed
+1 💚compile1m 23sthe patch passed
+1 💚javac1m 23sthe patch passed
+1 💚javadoc0m 47sthe patch passed
+1 💚shadedjars6m 10spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit254m 52shbase-server in the patch passed.
+1 💚unit5m 18shbase-diagnostics in the patch passed.
289m 55s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6384/4/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#6384
Optional Testsjavac javadoc unit compile shadedjars
unameLinux 2488de16aef9 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / e8e2715
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6384/4/testReport/
Max. process+thread count4476 (vs. ulimit of 30000)
modulesC: hbase-server hbase-diagnostics U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6384/4/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@NihalJain
NihalJain merged commit f4aafaf into apache:masterOct 23, 2024
NihalJain added a commit to NihalJain/hbase that referenced this pull request Oct 23, 2024
…agnostics with HBASE-28432 (apache#6384)
Signed-off-by: Istvan Toth <stoty@apache.org>
(cherry picked from commit f4aafaf)
NihalJain added a commit that referenced this pull request Oct 24, 2024
…agnostics with HBASE-28432 (#6384) (#6387)
Signed-off-by: Istvan Toth <stoty@apache.org>
(cherry picked from commit f4aafaf)
@ndimiduk

Copy link
Copy Markdown
Member

Thanks @NihalJain

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@NihalJain@Apache-HBase@ndimiduk@stoty