[ 
https://issues.apache.org/jira/browse/HBASE-28927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17890884#comment-17890884
 ] 

Nihal Jain commented on HBASE-28927:
------------------------------------

||Reason||Tests||
|SpotBugs|module: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]|
|SpotBugs|module: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]|

> Fix spotbugs issues introduced by refactoring to hbase-diagnostics with 
> HBASE-28432
> -----------------------------------------------------------------------------------
>
>                 Key: HBASE-28927
>                 URL: https://issues.apache.org/jira/browse/HBASE-28927
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Nihal Jain
>            Assignee: Nihal Jain
>            Priority: Major
>
> Seeing a lot of spotbugs issues across PRs lately. These are coming due to 
> newly added main code refactored as part of 
> https://issues.apache.org/jira/browse/HBASE-28432 I was not aware spotbugs 
> issues will be on complete code and not just PR code change. Also wanted to 
> avoid changing code as we were just 'refactoring'.
> As now code sits inside main and not test, we should try to fix all the 
> spotbugs issues.
> CC: [~ndimiduk], [~stoty] 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to