FrankChen021 commented on code in PR #20306:
URL: https://github.com/apache/druid/pull/20306#discussion_r3969706739
##########
indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/AbstractParallelIndexSupervisorTaskTest.java:
##########
@@ -251,12 +251,21 @@ protected ParallelIndexTuningConfig newTuningConfig(
.withPartitionsSpec(partitionsSpec)
.withForceGuaranteedRollup(forceGuaranteedRollup)
.withMaxNumConcurrentSubTasks(maxNumConcurrentSubTasks)
- // Serial tests need only a short poll interval;
concurrent tests retain the default.
-
.withTaskStatusCheckPeriodMs(maxNumConcurrentSubTasks == 1 ? 100L : null)
+
.withTaskStatusCheckPeriodMs(getTaskStatusCheckPeriodMs(maxNumConcurrentSubTasks))
.withMaxParseExceptions(5)
.build();
}
+ /**
+ * Task-status poll interval used by {@link #newTuningConfig}. Serial tests
need only a short poll interval;
+ * concurrent tests retain the production default (null). Subclasses whose
assertions do not depend on poll
+ * cadence can override this to cut wall-clock time without duplicating the
rest of the tuning config.
+ */
+ protected Long getTaskStatusCheckPeriodMs(int maxNumConcurrentSubTasks)
+ {
+ return maxNumConcurrentSubTasks == 1 ? 100L : null;
+ }
Review Comment:
Addressed in f3997f944d.
##########
indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/PartialCompactionTest.java:
##########
@@ -72,6 +72,7 @@ public class PartialCompactionTest extends
AbstractMultiPhaseParallelIndexingTes
null
);
private static final Interval INTERVAL_TO_INDEX =
Intervals.of("2017-12/P1M");
+ private static final long TASK_STATUS_CHECK_PERIOD_MS = 100L;
Review Comment:
Addressed in f3997f944d.
##########
indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/PartialCompactionTest.java:
##########
@@ -80,6 +81,18 @@ public PartialCompactionTest()
super(LockGranularity.TIME_CHUNK, DEFAULT_TRANSIENT_TASK_FAILURE_RATE,
DEFAULT_TRANSIENT_API_FAILURE_RATE);
}
+ /**
+ * This test drives several rounds of parallel indexing/compaction (each
with its own
+ * determine-partitions/generate/merge phases) back-to-back, always with
concurrent sub-tasks, so the
+ * base implementation would poll task status at the 1-second production
default and pay up to a full
+ * period per phase transition. None of the assertions here depend on the
poll cadence, so poll quickly.
+ */
+ @Override
+ protected Long getTaskStatusCheckPeriodMs(int maxNumConcurrentSubTasks)
Review Comment:
Addressed in f3997f944d.
##########
indexing-service/src/test/java/org/apache/druid/indexing/common/task/batch/parallel/PartialCompactionTest.java:
##########
@@ -80,6 +81,18 @@ public PartialCompactionTest()
super(LockGranularity.TIME_CHUNK, DEFAULT_TRANSIENT_TASK_FAILURE_RATE,
DEFAULT_TRANSIENT_API_FAILURE_RATE);
}
+ /**
+ * This test drives several rounds of parallel indexing/compaction (each
with its own
+ * determine-partitions/generate/merge phases) back-to-back, always with
concurrent sub-tasks, so the
+ * base implementation would poll task status at the 1-second production
default and pay up to a full
+ * period per phase transition. None of the assertions here depend on the
poll cadence, so poll quickly.
+ */
+ @Override
+ protected Long getTaskStatusCheckPeriodMs(int maxNumConcurrentSubTasks)
+ {
+ return TASK_STATUS_CHECK_PERIOD_MS;
+ }
Review Comment:
Addressed in f3997f944d.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]