Hean-Chhinling commented on code in PR #8635:
URL: https://github.com/apache/hadoop/pull/8635#discussion_r3673233037


##########
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:
   Thank for the review, @K0K0V0K.
   I have added to check the lastIndex instead to support Ipv6 as well.



-- 
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