[ 
https://issues.apache.org/jira/browse/YARN-2708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Yu resolved YARN-2708.
--------------------------
    Resolution: Not a Problem

> Potential null dereference in 
> CommonNodeLabelsManager#internalRemoveLabelsFromNode()
> ------------------------------------------------------------------------------------
>
>                 Key: YARN-2708
>                 URL: https://issues.apache.org/jira/browse/YARN-2708
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> Here is the code (around line 475):
> {code}
>       if (nodeId.getPort() == WILDCARD_PORT) {
>         Host host = nodeCollections.get(nodeId.getHost());
>         host.labels.removeAll(labels);
>         newNMToLabels.put(nodeId, host.labels);
>       } else {
>         Node nm = getNMInNodeSet(nodeId);
>         if (nm.labels != null) {
> {code}
> nm may be null in else block.
> In other places, node is created if non-existent:
> {code}
>       } else {
>         createNodeIfNonExisted(nodeId);
>         Node nm = getNMInNodeSet(nodeId);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to