Project Information
Project:
hadoop-yarn-server-resourcemanager
FindBugs version: 3.0.0
Code analyzed:
- /home/jenkins/jenkins-slave/workspace/PreCommit-YARN-Build/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/target/classes
Metrics
55908 lines of code analyzed,
in 1110 classes,
in 31 packages.
| High Priority Warnings |
1 |
0.02 |
| Medium Priority Warnings |
14 |
0.25 |
|
Total Warnings
|
15
|
0.27
|
(* Defects per Thousand lines of non-commenting source statements)
Contents
Summary
Warnings
Click on a warning row to see full context information.
|
DMI
|
Arguments in wrong order for invocation of checkNotNull in new org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt(ApplicationAttemptId, String, Queue, ActiveUsersManager, RMContext) |
|
|
Bug type DMI_ARGUMENTS_WRONG_ORDER (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt In method new org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt(ApplicationAttemptId, String, Queue, ActiveUsersManager, RMContext) Called method com.google.common.base.Preconditions.checkNotNull(Object, Object) Passing String constant as value that should be null checked String constant "RMContext should not be null" Local variable named rmContext At SchedulerApplicationAttempt.java:[line 128]
|
|
Dm
|
Found reliance on default encoding in org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore.createConnection(): String.getBytes() |
|
|
Bug type DM_DEFAULT_ENCODING (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore In method org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore.createConnection() Called method String.getBytes() At ZKRMStateStore.java:[line 1107]
|
|
AT
|
Sequence of calls to java.util.concurrent.ConcurrentHashMap may not be atomic in org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.SchedulingPolicy.getInstance(Class) |
|
|
Bug type AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.SchedulingPolicy In method org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.SchedulingPolicy.getInstance(Class) Type java.util.concurrent.ConcurrentHashMap Called method java.util.concurrent.ConcurrentHashMap.put(Object, Object) At SchedulingPolicy.java:[line 54]
|
|
IS
|
Inconsistent synchronization of org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt.queue; locked 57% of time |
|
|
Bug type IS2_INCONSISTENT_SYNC (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt Field org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt.queue Synchronized 57% of the time Unsynchronized access at SchedulerApplicationAttempt.java:[line 261] Unsynchronized access at FSAppAttempt.java:[line 176] Unsynchronized access at FSAppAttempt.java:[line 113] Synchronized access at SchedulerApplicationAttempt.java:[line 580] Synchronized access at SchedulerApplicationAttempt.java:[line 597] Synchronized access at FiCaSchedulerApp.java:[line 109] Synchronized access at FSAppAttempt.java:[line 144]
|
|
VO
|
Increment of volatile field org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbstractCSQueue.numContainers in org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbstractCSQueue.allocateResource(Resource, Resource, Set) |
|
|
Bug type VO_VOLATILE_INCREMENT (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbstractCSQueue In method org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbstractCSQueue.allocateResource(Resource, Resource, Set) Field org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbstractCSQueue.numContainers At AbstractCSQueue.java:[line 364]
|
|
VO
|
Increment of volatile field org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbstractCSQueue.numContainers in org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbstractCSQueue.releaseResource(Resource, Resource, Set) |
|
|
Bug type VO_VOLATILE_INCREMENT (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbstractCSQueue In method org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbstractCSQueue.releaseResource(Resource, Resource, Set) Field org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbstractCSQueue.numContainers At AbstractCSQueue.java:[line 393]
|
|
VO
|
Increment of volatile field org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue.numApplications in org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue.addApplication(ApplicationId, String) |
|
|
Bug type VO_VOLATILE_INCREMENT (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue In method org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue.addApplication(ApplicationId, String) Field org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue.numApplications At ParentQueue.java:[line 384]
|
|
VO
|
Increment of volatile field org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue.numApplications in org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue.removeApplication(ApplicationId, String) |
|
|
Bug type VO_VOLATILE_INCREMENT (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue In method org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue.removeApplication(ApplicationId, String) Field org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.ParentQueue.numApplications At ParentQueue.java:[line 409]
|
|
VO
|
Increment of volatile field org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode.numContainers in org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode.allocateContainer(RMContainer) |
|
|
Bug type VO_VOLATILE_INCREMENT (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode In method org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode.allocateContainer(RMContainer) Field org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode.numContainers At SchedulerNode.java:[line 137]
|
|
VO
|
Increment of volatile field org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode.numContainers in org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode.updateResource(Container) |
|
|
Bug type VO_VOLATILE_INCREMENT (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode In method org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode.updateResource(Container) Field org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNode.numContainers At SchedulerNode.java:[line 184]
|
|
RCN
|
Redundant nullcheck of containerReports, which is known to be non-null in org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler.recoverContainersOnNode(List, RMNode) |
|
|
Bug type RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler In method org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler.recoverContainersOnNode(List, RMNode) Value loaded from containerReports Redundant null check at AbstractYarnScheduler.java:[line 294]
|
|
SF
|
Switch statement found in org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl.updateMetricsForDeactivatedNode(NodeState, NodeState) where default case is missing |
|
|
Bug type SF_SWITCH_NO_DEFAULT (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl In method org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl.updateMetricsForDeactivatedNode(NodeState, NodeState) At RMNodeImpl.java:[lines 457-462] Another occurrence at RMNodeImpl.java:[lines 466-477]
|
|
SF
|
Switch statement found in org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl.updateMetricsForRejoinedNode(NodeState) where default case is missing |
|
|
Bug type SF_SWITCH_NO_DEFAULT (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl In method org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl.updateMetricsForRejoinedNode(NodeState) At RMNodeImpl.java:[lines 437-448]
|
|
SF
|
Switch statement found in org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl$ReconnectNodeTransition.transition(RMNodeImpl, RMNodeEvent) where default case is missing |
|
|
Bug type SF_SWITCH_NO_DEFAULT (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl$ReconnectNodeTransition In method org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl$ReconnectNodeTransition.transition(RMNodeImpl, RMNodeEvent) At RMNodeImpl.java:[lines 578-583]
|
|
SF
|
Switch statement found in org.apache.hadoop.yarn.server.resourcemanager.webapp.NodesPage$NodesBlock.render(HtmlBlock$Block) where default case is missing |
|
|
Bug type SF_SWITCH_NO_DEFAULT (click for details)
In class org.apache.hadoop.yarn.server.resourcemanager.webapp.NodesPage$NodesBlock In method org.apache.hadoop.yarn.server.resourcemanager.webapp.NodesPage$NodesBlock.render(HtmlBlock$Block) At NodesPage.java:[lines 88-93]
|
This code contains a sequence of calls to a concurrent abstraction
(such as a concurrent hash map).
These calls will not be executed atomically.
Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behaviour to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.
The arguments to this method call seem to be in the wrong order.
For example, a call Preconditions.checkNotNull("message", message)
has reserved arguments: the value to be checked is the first argument.
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.
This method contains a redundant check of a known non-null value against
the constant null.
This method contains a switch statement where default case is missing.
Usually you need to provide a default case.
Because the analysis only looks at the generated bytecode, this warning can be incorrect triggered if
the default case is at the end of the switch statement and doesn't end with a break statement.
This code increments a volatile field. Increments of volatile fields aren't
atomic. If more than one thread is incrementing the field at the same time,
increments could be lost.