xianjingfeng commented on code in PR #938:
URL: https://github.com/apache/incubator-uniffle/pull/938#discussion_r1223880879
##########
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");
+ if (type != null && type.equalsIgnoreCase("unhealthy")) {
Review Comment:
```suggestion
if (ServerStatus.UNHEALTHY.name().equal(type)) {
```
--
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]