-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-10582] If a new AM restarts, the total number of executors should be in initial state in driver side. #8737
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -232,6 +232,14 @@ private[spark] class ExecutorAllocationManager( | |
| executor.scheduleAtFixedRate(scheduleTask, 0, intervalMillis, TimeUnit.MILLISECONDS) | ||
| } | ||
|
|
||
| /** | ||
| * Change the value of numExecutorsTarget. | ||
| */ | ||
| def reSetNumExecutorsTarget(): Unit = { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reset ?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would just call this |
||
| logDebug(s"Now reset the value of numExecutorsTarget.") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indentation is off |
||
| numExecutorsTarget = conf.getInt("spark.dynamicAllocation.initialExecutors", minNumExecutors) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I understand correctly what's going on, this will result in Instead, wouldn't it be clearer to just explicitly send a message to the AM saying "this is the current state of the world, initialize yourself to deal with it"? Maybe as a reply to the Also,
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually think we should reset on the driver side as this patch has done, since we end up calling |
||
| } | ||
|
|
||
| /** | ||
| * Stop the allocation manager. | ||
| */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -170,6 +170,7 @@ private[spark] abstract class YarnSchedulerBackend( | |
| case RegisterClusterManager(am) => | ||
| logInfo(s"ApplicationMaster registered as $am") | ||
| amEndpoint = Some(am) | ||
| scheduler.sc.executorAllocationManager.foreach(_.reSetNumExecutorsTarget()) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here we also need to clear things in |
||
|
|
||
| case AddWebUIFilter(filterName, filterParams, proxyBase) => | ||
| addWebUIFilter(filterName, filterParams, proxyBase) | ||
|
|
||
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 too vague...