jerqi commented on code in PR #938:
URL: https://github.com/apache/incubator-uniffle/pull/938#discussion_r1229444331
##########
coordinator/src/main/java/org/apache/uniffle/coordinator/web/servlet/NodesServlet.java:
##########
@@ -37,20 +37,36 @@ 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;
+ protected Response handleGet(HttpServletRequest req, HttpServletResponse
resp) {
+ String requestURI = req.getRequestURI();
+ String methodName = requestURI.substring(requestURI.lastIndexOf("/"));
+ if (methodName == null || methodName.length() == 0) {
+ return Response.success("The requested address is incorrect, please
confirm!");
+ } else {
+ if (methodName.equalsIgnoreCase("getUnhealthy")) {
Review Comment:
We can refer to the style of Yarn
<img width="437" alt="企业微信截图_90117f9f-fd0d-4be5-8901-c9ee2373b510"
src="https://github.com/apache/incubator-uniffle/assets/8159038/d02234d5-db45-4a72-bc55-45666490df58">
--
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]