You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "chiacyu (via GitHub)" <gi...@apache.org> on 2025/03/15 05:19:32 UTC
[PR] HDDS-12551. Replace dnsToUuidMap with dnsToDnIdMap in SCMNodeManager [ozone]
chiacyu opened a new pull request, #8087:
URL: https://github.com/apache/ozone/pull/8087
## What changes were proposed in this pull request?
In `SCMNodeManager`, we maintain `DNS` to `Datanode` mapping. This is currently using `UUID` to represent `Datanode`, we can replace the `UUID` with `DatanodeID`.
## What is the link to the Apache JIRA
[HDDS-12551](https://issues.apache.org/jira/browse/HDDS-12551)
## How was this patch tested?
It can test by CI.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12551. Replace dnsToUuidMap with dnsToDnIdMap in SCMNodeManager [ozone]
Posted by "nandakumar131 (via GitHub)" <gi...@apache.org>.
nandakumar131 merged PR #8087:
URL: https://github.com/apache/ozone/pull/8087
--
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.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12551. Replace dnsToUuidMap with dnsToDnIdMap in SCMNodeManager [ozone]
Posted by "nandakumar131 (via GitHub)" <gi...@apache.org>.
nandakumar131 commented on code in PR #8087:
URL: https://github.com/apache/ozone/pull/8087#discussion_r1996793685
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/SCMNodeManager.java:
##########
@@ -1725,24 +1726,28 @@ public DatanodeDetails getNodeByUuid(UUID uuid) {
*/
@Override
public List<DatanodeDetails> getNodesByAddress(String address) {
+ List<DatanodeDetails> allNodes = getAllNodes();
List<DatanodeDetails> results = new LinkedList<>();
if (Strings.isNullOrEmpty(address)) {
LOG.warn("address is null");
return results;
}
- Set<UUID> uuids = dnsToUuidMap.get(address);
- if (uuids == null) {
+ Set<DatanodeID> datanodeIDS = dnsToDnIdMap.get(address);
+ if (datanodeIDS == null) {
LOG.debug("Cannot find node for address {}", address);
return results;
}
- for (UUID uuid : uuids) {
+ datanodeIDS.forEach(datanodeID -> {
try {
- results.add(nodeStateManager.getNode(uuid));
- } catch (NodeNotFoundException e) {
- LOG.warn("Cannot find node for uuid {}", uuid);
+ List<DatanodeDetails> datanodeDetails = allNodes.stream().
+ filter(node -> node.getID().getID().equals(datanodeID.getID())).
Review Comment:
```suggestion
filter(node -> node.getID().equals(datanodeID)).
```
--
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.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12551. Replace dnsToUuidMap with dnsToDnIdMap in SCMNodeManager [ozone]
Posted by "chiacyu (via GitHub)" <gi...@apache.org>.
chiacyu commented on PR #8087:
URL: https://github.com/apache/ozone/pull/8087#issuecomment-2726238912
Hi, @nandakumar131
Please take a look, while you're available, thanks!
--
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.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12551. Replace dnsToUuidMap with dnsToDnIdMap in SCMNodeManager [ozone]
Posted by "nandakumar131 (via GitHub)" <gi...@apache.org>.
nandakumar131 commented on PR #8087:
URL: https://github.com/apache/ozone/pull/8087#issuecomment-2727559888
Thanks @chiacyu for the contribution!
--
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.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org