[SPARK-31923][Core]Ignore internal accumulators that use unrecognized types rather than crashing (branch-2.4)#28758
Closed
zsxwing wants to merge 2 commits intoapache:branch-2.4from
Closed
[SPARK-31923][Core]Ignore internal accumulators that use unrecognized types rather than crashing (branch-2.4)#28758zsxwing wants to merge 2 commits intoapache:branch-2.4from
zsxwing wants to merge 2 commits intoapache:branch-2.4from
Conversation
…d types rather than crashing Ignore internal accumulators that use unrecognized types rather than crashing so that an event log containing such accumulators can still be converted to JSON and logged. A user may use internal accumulators by adding the `internal.metrics.` prefix to the accumulator name to hide sensitive information from UI (Accumulators except internal ones will be shown in Spark UI). However, `org.apache.spark.util.JsonProtocol.accumValueToJson` assumes an internal accumulator has only 3 possible types: `int`, `long`, and `java.util.List[(BlockId, BlockStatus)]`. When an internal accumulator uses an unexpected type, it will crash. An event log that contains such accumulator will be dropped because it cannot be converted to JSON, and it will cause weird UI issue when rendering in Spark History Server. For example, if `SparkListenerTaskEnd` is dropped because of this issue, the user will see the task is still running even if it was finished. It's better to make `accumValueToJson` more robust because it's up to the user to pick up the accumulator name. No The new unit tests. Closes apache#28744 from zsxwing/fix-internal-accum. Authored-by: Shixiong Zhu <zsxwing@gmail.com> Signed-off-by: Shixiong Zhu <zsxwing@gmail.com>
zsxwing
commented
Jun 8, 2020
| expectedValue = None) | ||
| } | ||
|
|
||
| test("SPARK-30936: forwards compatibility - ignore unknown fields") { |
Member
Author
There was a problem hiding this comment.
These two tests are not in branch-2.4, which causes the conflicts.
Contributor
|
LGTM. assuming tests pass. |
|
Test build #123648 has finished for PR 28758 at commit
|
asfgit
pushed a commit
that referenced
this pull request
Jun 8, 2020
…d types rather than crashing (branch-2.4) ### What changes were proposed in this pull request? Backport #28744 to branch-2.4. ### Why are the changes needed? Low risky fix for branch-2.4. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? New unit tests. Closes #28758 from zsxwing/SPARK-31923-2.4. Authored-by: Shixiong Zhu <zsxwing@gmail.com> Signed-off-by: Shixiong Zhu <zsxwing@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Backport #28744 to branch-2.4.
Why are the changes needed?
Low risky fix for branch-2.4.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
New unit tests.