Skip to content

Commit

Permalink
[CELEBORN-1608] Reduce redundant response for RESTful api
Browse files Browse the repository at this point in the history
### 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 apache#2755 from turboFei/reduce_toomany_resp.

Authored-by: Wang, Fei <[email protected]>
Signed-off-by: mingji <[email protected]>
  • Loading branch information
turboFei authored and FMX committed Sep 23, 2024
1 parent 1596cff commit 481a821
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 481a821

Please sign in to comment.