hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (YARN-2708) Potential null dereference in CommonNodeLabelsManager#internalRemoveLabelsFromNode()
Date Fri, 17 Oct 2014 21:52:34 GMT

     [ 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)

Mime
View raw message