[ 
https://issues.apache.org/jira/browse/HDDS-1879?focusedWorklogId=309708&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-309708
 ]

ASF GitHub Bot logged work on HDDS-1879:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Sep/19 11:18
            Start Date: 10/Sep/19 11:18
    Worklog Time Spent: 10m 
      Work Description: ChenSammi commented on pull request #1194: HDDS-1879.  
Support multiple excluded scopes when choosing datanodes in NetworkTopology
URL: https://github.com/apache/hadoop/pull/1194#discussion_r322685450
 
 

 ##########
 File path: 
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NetworkTopologyImpl.java
 ##########
 @@ -556,17 +571,17 @@ private Node chooseNodeInternal(String scope, int 
leafIndex,
     int nodeIndex;
     if (leafIndex >= 0) {
       nodeIndex = leafIndex % availableNodes;
-      ret = ((InnerNode)scopeNode).getLeaf(nodeIndex, excludedScope,
+      ret = ((InnerNode)scopeNode).getLeaf(nodeIndex, mutableExcludedScopes,
           mutableExNodes, ancestorGen);
     } else {
       nodeIndex = ThreadLocalRandom.current().nextInt(availableNodes);
-      ret = ((InnerNode)scopeNode).getLeaf(nodeIndex, excludedScope,
+      ret = ((InnerNode)scopeNode).getLeaf(nodeIndex, mutableExcludedScopes,
           mutableExNodes, ancestorGen);
     }
     LOG.debug("Choosing node[index={},random={}] from \"{}\" available nodes" +
             " scope=\"{}\", excludedScope=\"{}\", excludeNodes=\"{}\".",
 
 Review comment:
   The value of list is printed. 
   
   2019-09-10 19:16:53,044 INFO  net.NetworkTopology 
(NetworkTopologyImpl.java:chooseNodeInternal(561)) - Choosing 
node[index=0,random=true] from "4" available nodes scope="/", 
excludedScope="[/rack0/node4]", 
excludeNodes="[c96d3d66-259b-4eae-9a19-587aec77f5d6{ip: 253.157.233.249, host: 
node10, networkLocation: /rack2, certSerialId: null}, 
38f20ed2-c2f4-4665-a157-492aa74a80dc{ip: 20.53.242.116, host: node11, 
networkLocation: /rack2, certSerialId: null}, 
7de18ff0-154d-4861-b682-e0780f60679c{ip: 210.105.89.96, host: node7, 
networkLocation: /rack1, certSerialId: null}]".
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 309708)
    Time Spent: 3h 20m  (was: 3h 10m)

> Support multiple excluded scopes when choosing datanodes in NetworkTopology
> ---------------------------------------------------------------------------
>
>                 Key: HDDS-1879
>                 URL: https://issues.apache.org/jira/browse/HDDS-1879
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Sammi Chen
>            Assignee: Sammi Chen
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 3h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to