K0K0V0K commented on code in PR #8635:
URL: https://github.com/apache/hadoop/pull/8635#discussion_r3672266103


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-capacity-scheduler-ui/src/main/webapp/src/stores/slices/nodeLabelsSlice.ts:
##########
@@ -209,11 +209,24 @@ export const createNodeLabelsSlice: StateCreator<
     });
 
     try {
-      // Replace with new label or empty array if null
-      const newLabels = labelName ? [labelName] : [];
-
-      await get().apiClient.replaceNodeToLabels([{ nodeId, labels: newLabels 
}]);
-
+      const labels = labelName ? [labelName] : [];
+      const nodeToLabelsReplacement = [{ nodeId, labels }];
+
+      if (!labelName) {
+        const [host, port] = nodeId.split(':');

Review Comment:
   In the future, if YARN fully supports IPv6, this code could become a problem.
   Could you please make it compatible with IPv6 literals?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to