Vrushali C created YARN-5383:
--------------------------------
Summary: Fix findbugs for nodemanager
Key: YARN-5383
URL: https://issues.apache.org/jira/browse/YARN-5383
Project: Hadoop YARN
Issue Type: Bug
Reporter: Vrushali C
Assignee: Vrushali C
Nodemanager build shows a findbugs warning
{code}
Performance Warnings
Code Warning
WMI
org.apache.hadoop.yarn.server.nodemanager.ContainerExecutor.writeLaunchEnv(OutputStream,
Map, Map, List, Path, String) makes inefficient use of keySet iterator instead
of entrySet iterator
Bug type WMI_WRONG_MAP_ITERATOR (click for details)
In class org.apache.hadoop.yarn.server.nodemanager.ContainerExecutor
In method
org.apache.hadoop.yarn.server.nodemanager.ContainerExecutor.writeLaunchEnv(OutputStream,
Map, Map, List, Path, String)
At ContainerExecutor.java:[line 330]
Details
WMI_WRONG_MAP_ITERATOR: Inefficient use of keySet iterator instead of entrySet
iterator
This method accesses the value of a Map entry, using a key that was retrieved
from a keySet iterator. It is more efficient to use an iterator on the entrySet
of the map, to avoid the Map.get(key) lookup.
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]