[
https://issues.apache.org/jira/browse/HDDS-1663?focusedWorklogId=257335&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-257335
]
ASF GitHub Bot logged work on HDDS-1663:
----------------------------------------
Author: ASF GitHub Bot
Created on: 11/Jun/19 02:41
Start Date: 11/Jun/19 02:41
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:
Every new DatanodeDetails instance will have /default-rack as its location
if not explicitly set. It's handled in DatanodeDetails#Builder class.
----------------------------------------------------------------
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: 257335)
Time Spent: 3h (was: 2h 50m)
> 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: 3h
> 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]