You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2023/06/12 19:59:00 UTC
[jira] [Created] (HDDS-8826) Avoid String to UUID conversion in SCMNodeManager
Attila Doroszlai created HDDS-8826:
--------------------------------------
Summary: Avoid String to UUID conversion in SCMNodeManager
Key: HDDS-8826
URL: https://issues.apache.org/jira/browse/HDDS-8826
Project: Apache Ozone
Issue Type: Improvement
Components: SCM
Reporter: Attila Doroszlai
Assignee: Attila Doroszlai
SCMNodeManager#getNodeByUuid should support UUID param to avoid unnecessary conversion.
{code:title=https://github.com/apache/ozone/blob/2f71e041ab54cf7acabcf75aba8bc25e3f353490/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/SCMNodeManager.java#L1350-L1358}
public DatanodeDetails getNodeByUuid(String uuid) {
if (Strings.isNullOrEmpty(uuid)) {
LOG.warn("uuid is null");
return null;
}
DatanodeDetails temp = DatanodeDetails.newBuilder()
.setUuid(UUID.fromString(uuid)).build();
try {
return nodeStateManager.getNode(temp);
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org