This is an automated email from the ASF dual-hosted git repository.
ethanfeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new 481a821bf [CELEBORN-1608] Reduce redundant response for RESTful api
481a821bf is described below
commit 481a821bf5faed8437c664722717d857a9fc6e08
Author: Wang, Fei <[email protected]>
AuthorDate: Mon Sep 23 20:47:39 2024 +0800
[CELEBORN-1608] Reduce redundant response for RESTful api
### What changes were proposed in this pull request?
Currently, for exclude worker api, it will append all the workers info into
the response message.
Assume that, we have thousands of workers, the response info is too large
and redundant, as we already provide get workers api to return it.
### Why are the changes needed?
As title.
### Does this PR introduce _any_ user-facing change?
Yes, reduce the response. It should be fine, we already provide the api to
get workers details.
### How was this patch tested?
Existing UT.
Closes #2755 from turboFei/reduce_toomany_resp.
Authored-by: Wang, Fei <[email protected]>
Signed-off-by: mingji <[email protected]>
---
.../main/scala/org/apache/celeborn/service/deploy/master/Master.scala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala
b/master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala
index 7d8e5cc2d..b9e4887eb 100644
---
a/master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala
+++
b/master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala
@@ -1343,7 +1343,9 @@ private[celeborn] class Master(
(addWorkers ++ removeWorkers).filter(!statusSystem.workers.contains(_))
if (unknownExcludedWorkers.nonEmpty) {
sb.append(
- s"Unknown workers
${unknownExcludedWorkers.map(_.readableAddress).mkString(",")}. Workers in
Master:\n$getWorkers.")
+ s"Unknown workers
${unknownExcludedWorkers.map(_.readableAddress).mkString(",")}." +
+ s" Currently total ${statusSystem.manuallyExcludedWorkers.size()}" +
+ s" workers excluded manually in Master.")
}
workerExcludeResponse.getSuccess -> sb.toString()
}