[FLINK-34246][runtime] Add option to only archive failed jobs to history server - #29015
Open
argoyal2212 wants to merge 1 commit into
Open
Conversation
…ory server Adds jobmanager.archive.only-failed-jobs (default false) to skip archiving finished/canceled/suspended jobs to the history server.
Collaborator
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 is the purpose of the change
History server archival currently writes an archive to
jobmanager.archive.fs.dirfor every job that reaches a globally terminal state (FINISHED, CANCELED, FAILED). For clusters running many short-lived batch jobs, this creates a large number of archive files even though most users primarily care about investigating failed jobs.This PR adds an opt-in option to only archive jobs that reached the
FAILEDstate, reducing the number of files written to the archive directory.Brief change log
jobmanager.archive.only-failed-jobs(defaultfalse, backward compatible) toJobManagerOptions.Dispatcher#jobReachedTerminalStatenow skips calling theHistoryServerArchivistfor non-FAILEDterminal jobs when the option is enabled. ThesubmitFailedJobpath is unaffected since it always represents aFAILEDjob.docs/layouts/shortcodes/generated/job_manager_configuration.html.Verification
DispatcherResourceCleanupTest#testNotArchivingFinishedJobToHistoryServerWhenOnlyFailedJobsConfigured, asserting a FINISHED job is not archived when the option is enabled, while cleanup/termination still proceed normally.DispatcherResourceCleanupTest(18/18 passed) andDispatcherTest(48/48 passed).Does this pull request potentially affect one of the following parts
@Public(Evolving): no (newConfigOption, backward compatible, default preserves existing behavior)Documentation
ConfigOptionjavadoc + regenerated HTML).