Project Information
Project:
Apache Hadoop YARN Server Common
FindBugs version: 3.0.0
Code analyzed:
- /Users/aajisaka/git/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/target/classes
Metrics
14750 lines of code analyzed,
in 212 classes,
in 19 packages.
| High Priority Warnings |
|
0.00 |
| Medium Priority Warnings |
7 |
0.47 |
|
Total Warnings
|
7
|
0.47
|
(* Defects per Thousand lines of non-commenting source statements)
Contents
Summary
Warnings
Click on a warning row to see full context information.
|
NP
|
Possible null pointer dereference of appAttemptReports in org.apache.hadoop.yarn.server.webapp.WebServices.getAppAttempts(HttpServletRequest, HttpServletResponse, String) on exception path |
|
Bug type NP_NULL_ON_SOME_PATH_EXCEPTION (click for details)
In class org.apache.hadoop.yarn.server.webapp.WebServices In method org.apache.hadoop.yarn.server.webapp.WebServices.getAppAttempts(HttpServletRequest, HttpServletResponse, String) Value loaded from appAttemptReports Dereferenced at WebServices.java:[line 269] Null value at WebServices.java:[line 245] Known null at WebServices.java:[line 265] Known null at WebServices.java:[line 266]
|
|
NP
|
Possible null pointer dereference of appReports in org.apache.hadoop.yarn.server.webapp.WebServices.getApps(HttpServletRequest, HttpServletResponse, String, Set, String, String, String, String, String, String, String, String, Set) on exception path |
|
Bug type NP_NULL_ON_SOME_PATH_EXCEPTION (click for details)
In class org.apache.hadoop.yarn.server.webapp.WebServices In method org.apache.hadoop.yarn.server.webapp.WebServices.getApps(HttpServletRequest, HttpServletResponse, String, Set, String, String, String, String, String, String, String, String, Set) Value loaded from appReports Dereferenced at WebServices.java:[line 170] Null value at WebServices.java:[line 148] Known null at WebServices.java:[line 167] Known null at WebServices.java:[line 168]
|
|
NP
|
Possible null pointer dereference of containerReports in org.apache.hadoop.yarn.server.webapp.WebServices.getContainers(HttpServletRequest, HttpServletResponse, String, String) on exception path |
|
Bug type NP_NULL_ON_SOME_PATH_EXCEPTION (click for details)
In class org.apache.hadoop.yarn.server.webapp.WebServices In method org.apache.hadoop.yarn.server.webapp.WebServices.getContainers(HttpServletRequest, HttpServletResponse, String, String) Value loaded from containerReports Dereferenced at WebServices.java:[line 339] Null value at WebServices.java:[line 319] Known null at WebServices.java:[line 335] Known null at WebServices.java:[line 336]
|
|
IS
|
Inconsistent synchronization of org.apache.hadoop.yarn.server.api.records.impl.pb.NodeStatusPBImpl.builder; locked 76% of time |
|
Bug type IS2_INCONSISTENT_SYNC (click for details)
In class org.apache.hadoop.yarn.server.api.records.impl.pb.NodeStatusPBImpl Field org.apache.hadoop.yarn.server.api.records.impl.pb.NodeStatusPBImpl.builder Synchronized 76% of the time Unsynchronized access at NodeStatusPBImpl.java:[line 313] Unsynchronized access at NodeStatusPBImpl.java:[line 310] Unsynchronized access at NodeStatusPBImpl.java:[line 297] Unsynchronized access at NodeStatusPBImpl.java:[line 335] Unsynchronized access at NodeStatusPBImpl.java:[line 332] Unsynchronized access at NodeStatusPBImpl.java:[line 319] Synchronized access at NodeStatusPBImpl.java:[line 102] Synchronized access at NodeStatusPBImpl.java:[line 131] Synchronized access at NodeStatusPBImpl.java:[line 88] Synchronized access at NodeStatusPBImpl.java:[line 275] Synchronized access at NodeStatusPBImpl.java:[line 195] Synchronized access at NodeStatusPBImpl.java:[line 226] Synchronized access at NodeStatusPBImpl.java:[line 240] Synchronized access at NodeStatusPBImpl.java:[line 263] Synchronized access at NodeStatusPBImpl.java:[line 71] Synchronized access at NodeStatusPBImpl.java:[line 77] Synchronized access at NodeStatusPBImpl.java:[line 290] Synchronized access at NodeStatusPBImpl.java:[line 94] Synchronized access at NodeStatusPBImpl.java:[line 95] Synchronized access at NodeStatusPBImpl.java:[line 64] Synchronized access at NodeStatusPBImpl.java:[line 249] Synchronized access at NodeStatusPBImpl.java:[line 185] Synchronized access at NodeStatusPBImpl.java:[line 211] Synchronized access at NodeStatusPBImpl.java:[line 136] Synchronized access at NodeStatusPBImpl.java:[line 165] Synchronized access at NodeStatusPBImpl.java:[line 191]
|
|
IS
|
Inconsistent synchronization of org.apache.hadoop.yarn.server.api.records.impl.pb.NodeStatusPBImpl.proto; locked 83% of time |
|
Bug type IS2_INCONSISTENT_SYNC (click for details)
In class org.apache.hadoop.yarn.server.api.records.impl.pb.NodeStatusPBImpl Field org.apache.hadoop.yarn.server.api.records.impl.pb.NodeStatusPBImpl.proto Synchronized 83% of the time Unsynchronized access at NodeStatusPBImpl.java:[line 297] Unsynchronized access at NodeStatusPBImpl.java:[line 319] Synchronized access at NodeStatusPBImpl.java:[line 88] Synchronized access at NodeStatusPBImpl.java:[line 275] Synchronized access at NodeStatusPBImpl.java:[line 195] Synchronized access at NodeStatusPBImpl.java:[line 263] Synchronized access at NodeStatusPBImpl.java:[line 95] Synchronized access at NodeStatusPBImpl.java:[line 64] Synchronized access at NodeStatusPBImpl.java:[line 64] Synchronized access at NodeStatusPBImpl.java:[line 66] Synchronized access at NodeStatusPBImpl.java:[line 249] Synchronized access at NodeStatusPBImpl.java:[line 185]
|
|
IS
|
Inconsistent synchronization of org.apache.hadoop.yarn.server.api.records.impl.pb.NodeStatusPBImpl.viaProto; locked 84% of time |
|
Bug type IS2_INCONSISTENT_SYNC (click for details)
In class org.apache.hadoop.yarn.server.api.records.impl.pb.NodeStatusPBImpl Field org.apache.hadoop.yarn.server.api.records.impl.pb.NodeStatusPBImpl.viaProto Synchronized 84% of the time Unsynchronized access at NodeStatusPBImpl.java:[line 297] Unsynchronized access at NodeStatusPBImpl.java:[line 319] Synchronized access at NodeStatusPBImpl.java:[line 85] Synchronized access at NodeStatusPBImpl.java:[line 90] Synchronized access at NodeStatusPBImpl.java:[line 275] Synchronized access at NodeStatusPBImpl.java:[line 195] Synchronized access at NodeStatusPBImpl.java:[line 263] Synchronized access at NodeStatusPBImpl.java:[line 94] Synchronized access at NodeStatusPBImpl.java:[line 97] Synchronized access at NodeStatusPBImpl.java:[line 64] Synchronized access at NodeStatusPBImpl.java:[line 65] Synchronized access at NodeStatusPBImpl.java:[line 249] Synchronized access at NodeStatusPBImpl.java:[line 185]
|
|
DB
|
org.apache.hadoop.yarn.server.webapp.WebPageUtils.getAppsTableColumnDefs(boolean, boolean) uses the same code for two branches |
|
Bug type DB_DUPLICATE_BRANCHES (click for details)
In class org.apache.hadoop.yarn.server.webapp.WebPageUtils In method org.apache.hadoop.yarn.server.webapp.WebPageUtils.getAppsTableColumnDefs(boolean, boolean) At WebPageUtils.java:[line 51] At WebPageUtils.java:[line 51]
|
This method uses the same code to implement two branches of a conditional branch.
Check to ensure that this isn't a coding mistake.
The fields of this class appear to be accessed inconsistently with respect
to synchronization. This bug report indicates that the bug pattern detector
judged that
- The class contains a mix of locked and unlocked accesses,
- The class is not annotated as javax.annotation.concurrent.NotThreadSafe,
- At least one locked access was performed by one of the class's own methods, and
- The number of unsynchronized field accesses (reads and writes) was no more than
one third of all accesses, with writes being weighed twice as high as reads
A typical bug matching this bug pattern is forgetting to synchronize
one of the methods in a class that is intended to be thread-safe.
You can select the nodes labeled "Unsynchronized access" to show the
code locations where the detector believed that a field was accessed
without synchronization.
Note that there are various sources of inaccuracy in this detector;
for example, the detector cannot statically detect all situations in which
a lock is held. Also, even when the detector is accurate in
distinguishing locked vs. unlocked accesses, the code in question may still
be correct.
A reference value which is null on some exception control path is
dereferenced here. This may lead to a NullPointerException
when the code is executed.
Note that because FindBugs currently does not prune infeasible exception paths,
this may be a false warning.
Also note that FindBugs considers the default case of a switch statement to
be an exception path, since the default case is often infeasible.