elek commented on a change in pull request #1551: HDDS-2199 In SCMNodeManager
dnsToUuidMap cannot track multiple DNs on the same host
URL: https://github.com/apache/hadoop/pull/1551#discussion_r330622132
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMBlockProtocolServer.java
##########
@@ -295,7 +297,33 @@ public ScmInfo getScmInfo() throws IOException {
boolean auditSuccess = true;
try{
NodeManager nodeManager = scm.getScmNodeManager();
- Node client = nodeManager.getNodeByAddress(clientMachine);
Review comment:
> Eg this is passed in:
>
> DN0, DN5, DN10, DN15
>
> On the client machine is:
>
> DN1, DN6, DN10 and DN16
Not sure If I understand well. I think there are two parameters
1. The host name of the client (eg. DN10)
2. List of datanode UUIDs (DN1, DN6, DN10)
The task is to sort the list of datanode UUIDs, with prioritizing the client
machine.
First the client hostname is converted to UUID. This is the part which is
replaced by this complex block. If it could not been converted it can be null.
After that the topology logic sorts the list. `sortByDistanceCost`.
IMHO this functionality can be implemented my 4 lines of code, but fix me If
I am wrong.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]