davidradl commented on code in PR #26902:
URL: https://github.com/apache/flink/pull/26902#discussion_r2391999589
##########
flink-core/src/main/java/org/apache/flink/configuration/HistoryServerOptions.java:
##########
@@ -126,21 +127,77 @@ public class HistoryServerOptions {
"Enable HTTPs access to the HistoryServer web
frontend. This is applicable only when the"
+ " global SSL flag security.ssl.enabled
is set to true.");
+ private static final String HISTORY_SERVER_RETAINED_JOBS_KEY =
+ "historyserver.archive.retained-jobs";
+ private static final String HISTORY_SERVER_RETAINED_TTL_KEY =
+ "historyserver.archive.retained-ttl";
+ private static final String NOTE_MESSAGE =
+ "Note, when there are multiple history server instances, two
recommended approaches when using this option are: ";
+ private static final String CONFIGURE_SINGLE_INSTANCE =
+ "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. ";
+
public static final ConfigOption<Integer> HISTORY_SERVER_RETAINED_JOBS =
- key("historyserver.archive.retained-jobs")
+ key(HISTORY_SERVER_RETAINED_JOBS_KEY)
.intType()
.defaultValue(-1)
.withDescription(
Description.builder()
.text(
- String.format(
- "The maximum number of
jobs to retain in each archive directory defined by `%s`. ",
-
HISTORY_SERVER_ARCHIVE_DIRS.key()))
+ "The maximum number of jobs to
retain in each archive directory defined by %s. ",
+
code(HISTORY_SERVER_ARCHIVE_DIRS.key()))
+ .list(
+ text(
+ "If the option is not
specified as a positive number without specified %s, the all of jobs archive
will be retained. ",
+
code(HISTORY_SERVER_RETAINED_TTL_KEY)),
+ text(
+ "If the option is
specified as a positive number without specified value of %s, the jobs archive
whose order index based modification time is equals to or less than the value
will be retained. ",
+
code(HISTORY_SERVER_RETAINED_TTL_KEY)),
+ text(
+ "If this option is
specified as a positive number together with the specified %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_TTL_KEY)))
+ .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))
+ .build());
+
+ public static final ConfigOption<Duration> HISTORY_SERVER_RETAINED_TTL =
+ key(HISTORY_SERVER_RETAINED_TTL_KEY)
+ .durationType()
+ .noDefaultValue()
Review Comment:
the text says there is a default value but `.noDefaultValue()` implies there
isnt
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]