[WIP][CORE][HISTORY] Allow AppStatus to be cached and reused by the history server.#54878
Draft
ForVic wants to merge 2 commits intoapache:masterfrom
Draft
[WIP][CORE][HISTORY] Allow AppStatus to be cached and reused by the history server.#54878ForVic wants to merge 2 commits intoapache:masterfrom
ForVic wants to merge 2 commits intoapache:masterfrom
Conversation
1d0b1a7 to
5ed5e7e
Compare
5ed5e7e to
40fe298
Compare
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?
When a Spark application completes, we write out the AppStatus, the materialized state generated by the AppStatusListener in protobuf. When a Spark application is loaded in the Spark History Server, we load that state as an optimization, as opposed to recomputing that state using a ReplayListenerBus and AppStatusListener in the history server.
Why are the changes needed?
The Spark History Server can be slow to load application status for jobs with large event logs, due to deserialization overhead. The history server does the exact same work that is already being done on the driver during application runtime, while it is serving the live UI from the AppStatusListener's state into the KVStore (in-memory or rocksdb backed).
Does this PR introduce any user-facing change?
Yes, it introduces a couple of user facing configs to enable this change, and should result in the History server UI being quicker.
How was this patch tested?
Unit tests, and has been running internally, at scale across multiple spark history server instances for multiple days.
Was this patch authored or co-authored using generative AI tooling?
Partially,
Generated-by: GPT-5.4