FindBugs Report

Project Information

Project: hadoop-yarn-server-resourcemanager

FindBugs version: 3.0.0

Code analyzed:



Metrics

55908 lines of code analyzed, in 1110 classes, in 31 packages.

Metric Total Density*
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

Warning Type Number
Correctness Warnings 1
Internationalization Warnings 1
Multithreaded correctness Warnings 8
Dodgy code Warnings 5
Total 15

Warnings

Click on a warning row to see full context information.

Correctness Warnings

Code Warning
DMI Arguments in wrong order for invocation of checkNotNull in new org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt(ApplicationAttemptId, String, Queue, ActiveUsersManager, RMContext)

Internationalization Warnings

Code Warning
Dm Found reliance on default encoding in org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore.createConnection(): String.getBytes()

Multithreaded correctness Warnings

Code Warning
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)
IS Inconsistent synchronization of org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerApplicationAttempt.queue; locked 57% of time
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)
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)
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)
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)
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)
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)

Dodgy code Warnings

Code Warning
RCN Redundant nullcheck of containerReports, which is known to be non-null in org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler.recoverContainersOnNode(List, RMNode)
SF Switch statement found in org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl.updateMetricsForDeactivatedNode(NodeState, NodeState) where default case is missing
SF Switch statement found in org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl.updateMetricsForRejoinedNode(NodeState) where default case is missing
SF Switch statement found in org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl$ReconnectNodeTransition.transition(RMNodeImpl, RMNodeEvent) where default case is missing
SF Switch statement found in org.apache.hadoop.yarn.server.resourcemanager.webapp.NodesPage$NodesBlock.render(HtmlBlock$Block) where default case is missing

Details

AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION: Sequence of calls to concurrent abstraction may not be atomic

This code contains a sequence of calls to a concurrent abstraction (such as a concurrent hash map). These calls will not be executed atomically.

DM_DEFAULT_ENCODING: Reliance on default encoding

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.

DMI_ARGUMENTS_WRONG_ORDER: Reversed method arguments

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.

IS2_INCONSISTENT_SYNC: Inconsistent synchronization

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

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.

RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE: Redundant nullcheck of value known to be non-null

This method contains a redundant check of a known non-null value against the constant null.

SF_SWITCH_NO_DEFAULT: Switch statement found where default case is missing

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.

VO_VOLATILE_INCREMENT: An increment to a volatile field isn't atomic

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.