hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sunil G (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-3075) NodeLabelsManager implementation to retrieve label to node mapping
Date Wed, 21 Jan 2015 19:48:36 GMT

    [ https://issues.apache.org/jira/browse/YARN-3075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14286155#comment-14286155
] 

Sunil G commented on YARN-3075:
-------------------------------

Hi [~varun_saxena]

Thanks for taking this item up..

I have some comments..

1. 
{code}
+  private void replaceNodeForLabels(NodeId node, Set<String> oldLabels,
+      Set<String> newLabels) {
{code}

If i understood correctly, *NodeID* is removed from *oldLabels* which are present in *labelCollections*.
And new *NodeID* is passed to *newLabels* which are present in *labelCollections*. 
which is same as calling 
removeNodeFromLabels(node, oldLabels);
addNodeToLabels(node, newLabels);

2.
{code}
+  public void addNodeId(NodeId node) {
+    nodeIds.add(NodeId.newInstance(node.getHost(), node.getPort()));
+  }
{code}

Why  newInstance is needed?


3. 
{code}
+        case REMOVE:
+          removeNodeFromLabels(nodeId, labels);
{code}

Below *for* loop also has same method invocation. If so, is this call needed? host.nms.entrySet()
will come with all NodeID's rt?

4. Possible NPE from nodeLabelInfo ?
{code}
+        for (String label : labels) {
+          NodeLabel nodeLabelInfo = labelCollections.get(label);
+          Set<NodeId> nodeIds = nodeLabelInfo.getNodeIdInfo();
{code}


> NodeLabelsManager implementation to retrieve label to node mapping
> ------------------------------------------------------------------
>
>                 Key: YARN-3075
>                 URL: https://issues.apache.org/jira/browse/YARN-3075
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>    Affects Versions: 2.7.0
>            Reporter: Varun Saxena
>            Assignee: Varun Saxena
>         Attachments: YARN-3075.001.patch
>
>




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

Mime
View raw message