spuru9 commented on code in PR #29015:
URL: https://github.com/apache/flink/pull/29015#discussion_r3981941198
##########
flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherResourceCleanupTest.java:
##########
@@ -736,6 +737,39 @@ public void testNotArchivingSuspendedJobToHistoryServer()
throws Exception {
assertFalse(isArchived.get());
}
+ @Test
Review Comment:
it mentions in the previous comment
https://github.com/apache/flink/pull/29015#issuecomment-5607946667 that a
positive test testArchivingFailedJobToHistoryServerWhenOnlyFailedJobsConfigured
was added but I don't see it has landed in this PR. Can you recheck.
##########
flink-core/src/main/java/org/apache/flink/configuration/JobManagerOptions.java:
##########
@@ -308,6 +308,29 @@ public class JobManagerOptions {
.withDescription(
"Directory for JobManager to store the archives of
completed jobs.");
+ /**
+ * Whether only jobs that reached the {@code FAILED} terminal state should
be archived to {@link
+ * #ARCHIVE_DIR}.
+ */
+ @Documentation.Section(Documentation.Sections.ALL_JOB_MANAGER)
+ public static final ConfigOption<Boolean> ARCHIVE_ON_FAILED_JOBS_ONLY =
+ key("jobmanager.archive.only-failed-jobs")
+ .booleanType()
+ .defaultValue(false)
+ .withDescription(
+ Description.builder()
+ .text(
+ "Whether to only archive jobs that
reached the %s terminal state to %s.",
Review Comment:
```suggestion
"Whether to only archive jobs
that reached the %s terminal state to %s. ",
```
##########
flink-core/src/main/java/org/apache/flink/configuration/JobManagerOptions.java:
##########
@@ -308,6 +308,29 @@ public class JobManagerOptions {
.withDescription(
"Directory for JobManager to store the archives of
completed jobs.");
+ /**
+ * Whether only jobs that reached the {@code FAILED} terminal state should
be archived to {@link
+ * #ARCHIVE_DIR}.
+ */
+ @Documentation.Section(Documentation.Sections.ALL_JOB_MANAGER)
+ public static final ConfigOption<Boolean> ARCHIVE_ON_FAILED_JOBS_ONLY =
+ key("jobmanager.archive.only-failed-jobs")
+ .booleanType()
+ .defaultValue(false)
+ .withDescription(
+ Description.builder()
+ .text(
+ "Whether to only archive jobs that
reached the %s terminal state to %s.",
+ code("FAILED"),
code(ARCHIVE_DIR.key()))
+ .text(
+ "When enabled, jobs that finished,
were canceled, or were suspended are not "
Review Comment:
nit: listing "were suspended" is a bit misleading — suspended jobs are only
locally terminal and never hit the archive path anyway, so this flag doesn't
govern them.
--
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]