-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-38777][history] HistoryServer supports application archives #27430
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
Open
eemario
wants to merge
1
commit into
apache:master
Choose a base branch
from
eemario:FLIP549-8
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,313
−97
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,17 +51,6 @@ public class HistoryServerOptions { | |
| + " monitor these directories for archived jobs. You can configure the JobManager to archive jobs to a" | ||
| + " directory via `jobmanager.archive.fs.dir`."); | ||
|
|
||
| /** If this option is enabled then deleted job archives are also deleted from HistoryServer. */ | ||
| public static final ConfigOption<Boolean> HISTORY_SERVER_CLEANUP_EXPIRED_JOBS = | ||
| key("historyserver.archive.clean-expired-jobs") | ||
| .booleanType() | ||
| .defaultValue(false) | ||
| .withDescription( | ||
| String.format( | ||
| "Whether HistoryServer should cleanup jobs" | ||
| + " that are no longer present `%s`.", | ||
| HISTORY_SERVER_ARCHIVE_DIRS.key())); | ||
|
|
||
| /** | ||
| * Pattern of the log URL of TaskManager. The HistoryServer will generate actual URLs from it. | ||
| */ | ||
|
|
@@ -137,6 +126,24 @@ public class HistoryServerOptions { | |
| "Specify the option in only one HistoryServer instance to avoid errors caused by multiple instances simultaneously cleaning up remote files, "; | ||
| private static final String CONFIGURE_CONSISTENT = | ||
| "Or you can keep the value of this configuration consistent across them. "; | ||
| private static final String LEGACY_NOTE_MESSAGE = | ||
| "Note: This option applies only to legacy job archives created before the introduction of application archiving (FLINK-38761)."; | ||
| private static final String RETAINED_STRATEGY_MESSAGE = | ||
| "Archived entities will be removed if their TTL has expired or the retention count limit has been reached. "; | ||
|
|
||
| /** If this option is enabled then deleted job archives are also deleted from HistoryServer. */ | ||
| public static final ConfigOption<Boolean> HISTORY_SERVER_CLEANUP_EXPIRED_JOBS = | ||
| key("historyserver.archive.clean-expired-jobs") | ||
| .booleanType() | ||
| .defaultValue(false) | ||
| .withDescription( | ||
| Description.builder() | ||
| .text( | ||
| "Whether HistoryServer should cleanup jobs that are no longer present in the archive directory defined by %s. ", | ||
| code(HISTORY_SERVER_ARCHIVE_DIRS.key())) | ||
| .linebreak() | ||
| .text(LEGACY_NOTE_MESSAGE) | ||
|
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. we should deprecate the options that only apply to the legacy case. I assume there is an intention to remove them in the next version change |
||
| .build()); | ||
|
|
||
| public static final ConfigOption<Integer> HISTORY_SERVER_RETAINED_JOBS = | ||
| key(HISTORY_SERVER_RETAINED_JOBS_KEY) | ||
|
|
@@ -164,6 +171,52 @@ public class HistoryServerOptions { | |
| code("IllegalConfigurationException")) | ||
| .linebreak() | ||
| .text(NOTE_MESSAGE) | ||
| .list( | ||
| text(CONFIGURE_SINGLE_INSTANCE), | ||
| text(CONFIGURE_CONSISTENT)) | ||
| .linebreak() | ||
| .text(LEGACY_NOTE_MESSAGE) | ||
| .build()); | ||
|
|
||
| /** | ||
| * If this option is enabled then deleted application archives are also deleted from | ||
| * HistoryServer. | ||
| */ | ||
| public static final ConfigOption<Boolean> HISTORY_SERVER_CLEANUP_EXPIRED_APPLICATIONS = | ||
| key("historyserver.archive.clean-expired-applications") | ||
| .booleanType() | ||
| .defaultValue(false) | ||
| .withDescription( | ||
| Description.builder() | ||
| .text( | ||
| "Whether HistoryServer should cleanup jobs that are no longer present in the archive directory defined by %s. ", | ||
| code(HISTORY_SERVER_ARCHIVE_DIRS.key())) | ||
| .build()); | ||
|
|
||
| public static final ConfigOption<Integer> HISTORY_SERVER_RETAINED_APPLICATIONS = | ||
| key("historyserver.archive.retained-applications") | ||
| .intType() | ||
| .defaultValue(-1) | ||
| .withDescription( | ||
| Description.builder() | ||
| .text( | ||
| String.format( | ||
| "The maximum number of applications to retain in each archive directory defined by %s. ", | ||
| code(HISTORY_SERVER_ARCHIVE_DIRS.key()))) | ||
| .text( | ||
| "This option works together with the TTL (see %s). ", | ||
| code(HISTORY_SERVER_RETAINED_TTL_KEY)) | ||
| .text(RETAINED_STRATEGY_MESSAGE) | ||
| .linebreak() | ||
| .text( | ||
| "If set to `-1`(default), there is no limit to the number of archives. ") | ||
| .text( | ||
| "If set to %s or less than %s, HistoryServer will throw an %s. ", | ||
| code("0"), | ||
| code("-1"), | ||
| code("IllegalConfigurationException")) | ||
| .linebreak() | ||
| .text(NOTE_MESSAGE) | ||
| .list( | ||
| text(CONFIGURE_SINGLE_INSTANCE), | ||
| text(CONFIGURE_CONSISTENT)) | ||
|
|
@@ -176,18 +229,14 @@ public class HistoryServerOptions { | |
| .withDescription( | ||
| Description.builder() | ||
| .text( | ||
| "The time-to-live duration to retain the jobs archived in each archive directory defined by %s. ", | ||
| "The time-to-live duration to retain the archived entities (jobs and applications) in each archive directory defined by %s. ", | ||
| code(HISTORY_SERVER_ARCHIVE_DIRS.key())) | ||
| .list( | ||
| text( | ||
| "If the option is not specified without specifying %s, all of the jobs archives will be retained. ", | ||
| code(HISTORY_SERVER_RETAINED_JOBS_KEY)), | ||
| text( | ||
| "If the option is specified without specifying %s, the jobs archive whose modification time in the time-to-live duration will be retained. ", | ||
| code(HISTORY_SERVER_RETAINED_JOBS_KEY)), | ||
| text( | ||
| "If this option is specified as a positive time duration together with the %s option, the job archive will be removed if its TTL has expired or the retained job count has been reached. ", | ||
| code(HISTORY_SERVER_RETAINED_JOBS_KEY))) | ||
| .text( | ||
| "This option works together with the retention count limits (see %s and %s). ", | ||
| code(HISTORY_SERVER_RETAINED_APPLICATIONS.key()), | ||
| code(HISTORY_SERVER_RETAINED_JOBS_KEY)) | ||
| .text(RETAINED_STRATEGY_MESSAGE) | ||
| .linebreak() | ||
| .text( | ||
| "If set to equal to or less than %s milliseconds, HistoryServer will throw an %s. ", | ||
| code("0"), code("IllegalConfigurationException")) | ||
|
|
||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
What is org.apache.flink.configuration.description.TextElement@ae3540e - is this supposed to be a link?
what is
<br />. This seems to be an end br tag with a space in. what does this mean?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 was caused by a mistake in the HistoryServerOptions description. I will fix it and regenerate the docs. Thanks for pointing it out!