You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-dev@hadoop.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2014/10/17 23:52:34 UTC
[jira] [Resolved] (YARN-2708) Potential null dereference in
CommonNodeLabelsManager#internalRemoveLabelsFromNode()
[ 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)