[
https://issues.apache.org/jira/browse/HDDS-1663?focusedWorklogId=257333&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-257333
]
ASF GitHub Bot logged work on HDDS-1663:
----------------------------------------
Author: ASF GitHub Bot
Created on: 11/Jun/19 02:38
Start Date: 11/Jun/19 02:38
Worklog Time Spent: 10m
Work Description: ChenSammi commented on pull request #937: HDDS-1663.
Add datanode to network topology cluster during node regis…
URL: https://github.com/apache/hadoop/pull/937#discussion_r292258632
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/SCMNodeManager.java
##########
@@ -228,14 +251,27 @@ public RegisteredCommand register(
datanodeDetails.setIpAddress(dnAddress.getHostAddress());
}
try {
+ String location;
+ if (useHostname) {
+ datanodeDetails.setNetworkName(datanodeDetails.getHostName());
+ location = nodeResolve(datanodeDetails.getHostName());
+ } else {
+ datanodeDetails.setNetworkName(datanodeDetails.getIpAddress());
+ location = nodeResolve(datanodeDetails.getIpAddress());
+ }
+ if (location != null) {
Review comment:
All current implemented DNSToSwitchMapping classes which resolve node to
location will return "/default-rack" if can not find a match location. But this
behavior is clearly defined in the interface definition. So the location null
check is kept here to avoid future break of this assumption if new
DNSToSwitchMapping class is introduced.
----------------------------------------------------------------
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: 257333)
Time Spent: 2h 40m (was: 2.5h)
> Add datanode to network topology cluster during node register
> -------------------------------------------------------------
>
> Key: HDDS-1663
> URL: https://issues.apache.org/jira/browse/HDDS-1663
> Project: Hadoop Distributed Data Store
> Issue Type: Sub-task
> Reporter: Sammi Chen
> Assignee: Sammi Chen
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]