-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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-8857][SPARK-8859][Core]Add an internal flag to Accumulable and send internal accumulator updates to the driver via heartbeats #7448
Conversation
…ates to the driver via heartbeats
What happens if my accumulator update is huge? Could this lead to dropped heartbeats? |
Ah, I see now that it's only for specific accumulators and is internal-only. |
Test build #37509 has finished for PR 7448 at commit
|
Test build #37510 has finished for PR 7448 at commit
|
@transient initialValue: R, | ||
param: AccumulableParam[R, T], | ||
val name: Option[String]) | ||
val name: Option[String], | ||
internal: Boolean) |
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.
add internal to the scaladoc param to explain what it is
cc @andrewor14 for review also |
I took a look at accumulator implementation -- one thing that is really annoying is boxing. Right now every update will box -- and it will really sucks for SQL if we do update per row. In order for SQL to work better, I think we'd need to create a subtype of accumulator called LongAccumulator and DoubleAccumulator, that includes specialized methods for updating. That can be done in a separate pull request. |
Added comments.
Will do it in a follow up PR. |
LGTM. |
Test build #37559 has finished for PR 7448 at commit
|
Thanks - I've merged this. |
LGTM2, but it would be great to have some unit tests on this. |
This PR includes the following changes:
Accumulators.localAccums
. Instead, all Accumulators in the executors will register with its TaskContext.