-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-4754] Refactor SparkContext into ExecutorAllocationClient #3614
Conversation
This is such that the ExecutorAllocationManager does not take in the SparkContext with all of its dependencies as an argument. This prevents future developers of this class to tie down this class further with the SparkContext, which has really become quite a monstrous object.
Test build #24168 has started for PR 3614 at commit
|
Test build #24168 has finished for PR 3614 at commit
|
Test PASSed. |
…ion-sc Conflicts: core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
Test build #24286 has started for PR 3614 at commit
|
Test build #24286 has finished for PR 3614 at commit
|
Test PASSed. |
…ion-sc Conflicts: core/src/main/scala/org/apache/spark/SparkContext.scala
Test build #24329 has started for PR 3614 at commit
|
+1; this looks like a good refactoring. I like how the new I think the mixin trait shouldn't be an issue here; I think that the problems that I ran into with this pattern were related to the closure cleaner and additional levels of |
private[spark] trait ExecutorAllocationClient { | ||
|
||
/** | ||
* Request an additional number of executors from the cluster manager. |
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.
Actually, one comment here: it might be nice to document the meaning of the return type. It looks like the scaladoc in CoarseGrainedSchedulerBackend already does 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.
yeah I left that out accidentally
Test build #24329 timed out for PR 3614 at commit |
Test FAILed. |
retest this please |
Test build #24373 has started for PR 3614 at commit
|
Test build #24373 has finished for PR 3614 at commit
|
Test PASSed. |
Just curious here, but is the eventual goal to pull this functionality(adding/removing executors) out of the SparkContext object? |
No, this is literally just refactoring for better code style |
@andrewor14 This looks good to me. Any blockers to merging this? |
Nope, I'll merge this into master and 1.2 now thanks (after fixing the comments) |
This is such that the `ExecutorAllocationManager` does not take in the `SparkContext` with all of its dependencies as an argument. This prevents future developers of this class to tie down this class further with the `SparkContext`, which has really become quite a monstrous object. cc'ing pwendell who originally suggested this, and JoshRosen who may have thoughts about the trait mix-in style of `SparkContext`. Author: Andrew Or <[email protected]> Closes #3614 from andrewor14/dynamic-allocation-sc and squashes the following commits: 187070d [Andrew Or] Merge branch 'master' of github.com:apache/spark into dynamic-allocation-sc 59baf6c [Andrew Or] Merge branch 'master' of github.com:apache/spark into dynamic-allocation-sc 347a348 [Andrew Or] Refactor SparkContext into ExecutorAllocationClient (cherry picked from commit 9804a75) Signed-off-by: Andrew Or <[email protected]> Conflicts: core/src/main/scala/org/apache/spark/SparkContext.scala
This is such that the
ExecutorAllocationManager
does not take in theSparkContext
with all of its dependencies as an argument. This prevents future developers of this class to tie down this class further with theSparkContext
, which has really become quite a monstrous object.cc'ing @pwendell who originally suggested this, and @JoshRosen who may have thoughts about the trait mix-in style of
SparkContext
.