xianjingfeng commented on code in PR #938:
URL: https://github.com/apache/incubator-uniffle/pull/938#discussion_r1223880198


##########
coordinator/src/main/java/org/apache/uniffle/coordinator/web/servlet/NodesServlet.java:
##########
@@ -38,19 +38,31 @@ public NodesServlet(CoordinatorServer coordinator) {
 
   @Override
   protected Response<List<ServerNode>> handleGet(HttpServletRequest req, 
HttpServletResponse resp) {
-    List<ServerNode> serverList = 
coordinator.getClusterManager().getServerList(Collections.EMPTY_SET);
-    String id = req.getParameter("id");
-    String status = req.getParameter("status");
-    serverList = serverList.stream().filter((server) -> {
-      if (id != null && !id.equals(server.getId())) {
-        return false;
-      }
-      if (status != null && !server.getStatus().toString().equals(status)) {
-        return false;
-      }
-      return true;
-    }).collect(Collectors.toList());
-    Collections.sort(serverList, Comparator.comparing(ServerNode::getId));
-    return Response.success(serverList);
+    String type = req.getParameter("type");

Review Comment:
   Why do we need a new parameter? Could we use `status`?



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