Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CELEBORN-883][WORKER] Optimized configuration checks during MemoryManager initialization #1801

Closed
wants to merge 12 commits into from

Conversation

zwangsheng
Copy link
Contributor

What changes were proposed in this pull request?

  1. Expose the config check logic during MemoryManager#initialization in the user configuration doc.
  2. Add Preconditions Error Message
  3. Add unit test to make sure that part of the logic isn't altered by mistake

Why are the changes needed?

User-friendly

Does this PR introduce any user-facing change?

Yes

How was this patch tested?

Add Unit Test

@zwangsheng zwangsheng requested a review from FMX August 9, 2023 06:13
@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Merging #1801 (d857bb8) into main (0d12616) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1801      +/-   ##
==========================================
- Coverage   46.76%   46.75%   -0.01%     
==========================================
  Files         162      162              
  Lines       10077    10078       +1     
  Branches      927      927              
==========================================
- Hits         4712     4711       -1     
- Misses       5058     5059       +1     
- Partials      307      308       +1     
Files Changed Coverage Δ
...cala/org/apache/celeborn/common/CelebornConf.scala 87.44% <100.00%> (+0.01%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -2450,7 +2450,8 @@ object CelebornConf extends Logging {
val WORKER_DIRECT_MEMORY_RATIO_PAUSE_REPLICATE: ConfigEntry[Double] =
buildConf("celeborn.worker.directMemoryRatioToPauseReplicate")
.categories("worker")
.doc("If direct memory usage reaches this limit, the worker will stop to receive replication data from other workers.")
.doc("If direct memory usage reaches this limit, the worker will stop to receive replication data from other workers." +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.doc("If direct memory usage reaches this limit, the worker will stop to receive replication data from other workers." +
.doc("If direct memory usage reaches this limit, the worker will stop to receive replication data from other workers. " +

Preconditions.checkArgument(
pauseReplicateRatio > pausePushDataRatio,
String.format(
"Invalid config, {} should be greater than {}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's also mention the value in the error message

Suggested change
"Invalid config, {} should be greater than {}",
"Invalid config, {}({}) should be greater than {}({})",


import org.apache.celeborn.common.CelebornConf;

public class MemoryManagerSuiteJ {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scala is preferred for brand new testing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Idea!

@zwangsheng
Copy link
Contributor Author

thanks, merge to main

waitinfuture pushed a commit that referenced this pull request Aug 23, 2023
…nager initialization

<!--
Thanks for sending a pull request!  Here are some tips for you:
  - Make sure the PR title start w/ a JIRA ticket, e.g. '[CELEBORN-XXXX] Your PR title ...'.
  - Be sure to keep the PR description updated to reflect all changes.
  - Please write your PR title to summarize what this PR proposes.
  - If possible, provide a concise example to reproduce the issue for a faster review.
-->

### What changes were proposed in this pull request?
1. Expose the config check logic during `MemoryManager#initialization` in the user configuration doc.
2. Add Preconditions Error Message
3. Add unit test to make sure that part of the logic isn't altered by mistake

### Why are the changes needed?
User-friendly

### Does this PR introduce _any_ user-facing change?
Yes

### How was this patch tested?
Add Unit Test

Closes #1801 from zwangsheng/CELEBORN-883.

Authored-by: zwangsheng <[email protected]>
Signed-off-by: zwangsheng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants