-
Notifications
You must be signed in to change notification settings - Fork 134
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
Introduce data cleanup mechanism on stage level #249
Conversation
Codecov Report
@@ Coverage Diff @@
## master #249 +/- ##
============================================
- Coverage 60.11% 59.17% -0.95%
- Complexity 1217 1369 +152
============================================
Files 150 166 +16
Lines 7602 8974 +1372
Branches 718 853 +135
============================================
+ Hits 4570 5310 +740
- Misses 2791 3390 +599
- Partials 241 274 +33
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
PTAL @jerqi . The unregister is now scoped with Spark, MR will be supported in the next commits. |
Why do the mr need to clean up the shuffle of stage level? MR don't have multiple stages. |
Oh yes. My fault. |
Gentle ping @jerqi If u have time, could u help review this? I think I have some time to quick fix at national day. |
I will take a look at this pr asap. |
try { | ||
ExecutorService executorService = | ||
Executors.newFixedThreadPool( | ||
Math.min(10, shuffleServerInfoSet.size()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we use 10
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Emm. Maybe we should use the Runtime.getRuntime().availableProcessors()
. And I have no idea on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10
is the experienced value. The request is lightweight, I think 10 threads are enough. There is no need to introduce extra config to increase the understanding burden for users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Em... we would better use configuration option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I will extract config entry.
storage/src/main/java/org/apache/uniffle/storage/handler/impl/LocalFileDeleteHandler.java
Show resolved
Hide resolved
One question? |
Two reasons.
|
client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java
Show resolved
Hide resolved
Math.min(10, shuffleServerInfoSet.size()), | ||
ThreadUtils.getThreadFactory("unregister-shuffle-%d") | ||
); | ||
List<Future<Void>> futures = executorService.invokeAll(callableList, 10, TimeUnit.SECONDS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10 seconds? Should it be configuration option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the default timeout, considering the request is lightweight, I think 10s is enough. There is no need to introduce extra config to increase the understanding burden for users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes the timeout may not be enough, we should give a default value according to our experience. Usually we can't image all the situations that users use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
...t/spark-common/src/test/java/org/apache/uniffle/test/ShuffleUnregisterWithLocalfileTest.java
Outdated
Show resolved
Hide resolved
storage/src/main/java/org/apache/uniffle/storage/handler/impl/HdfsShuffleDeleteHandler.java
Show resolved
Hide resolved
Updated. |
Actually we still add a method |
Changelog of latest commit
|
78e7790
to
ca32441
Compare
Gentle ping @jerqi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @zuston
Thanks for your review @jerqi |
### What changes were proposed in this pull request? Followup #249. Cleanup code and unify interfaces. ### Why are the changes needed? Cleanup code and unify interfaces. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? CI.
What changes were proposed in this pull request?
Introduce data cleanup mechanism on stage level
Why are the changes needed?
This PR is to optimize the disk capacity. For example
Does this PR introduce any user-facing change?
No
How was this patch tested?
UTs