gianm commented on code in PR #17718:
URL: https://github.com/apache/druid/pull/17718#discussion_r1953182566
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/MSQWorkerTaskLauncher.java:
##########
@@ -72,12 +72,17 @@
public class MSQWorkerTaskLauncher implements RetryCapableWorkerManager
{
private static final Logger log = new Logger(MSQWorkerTaskLauncher.class);
- private static final long HIGH_FREQUENCY_CHECK_MILLIS = 100;
- private static final long LOW_FREQUENCY_CHECK_MILLIS = 2000;
- private static final long SWITCH_TO_LOW_FREQUENCY_CHECK_AFTER_MILLIS = 10000;
- private static final long SHUTDOWN_TIMEOUT_MILLIS =
Duration.ofMinutes(1).toMillis();
+
private int currentRelaunchCount = 0;
+ public static class MSQWorkerTaskLauncherConfig
+ {
+ public long highFrequenceCheckMillis = 100;
Review Comment:
`Frequency` (spelling)
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/MSQWorkerTaskLauncher.java:
##########
@@ -150,7 +156,8 @@ public MSQWorkerTaskLauncher(
final OverlordClient overlordClient,
final WorkerFailureListener workerFailureListener,
final Map<String, Object> taskContextOverrides,
- final long maxTaskStartDelayMillis
+ long maxTaskStartDelayMillis,
Review Comment:
style: let's not mix `final` and non-`final` in the same argument list
unless the non-`final` things really need to be reassignable. Here, they don't.
My personal preference is that the things are all marked `final`. (I tend to
use `final` a lot because I wish `final` was the default in Java, and I wish a
keyword was needed to make something not-`final`. The closest I can get to that
is marking everything `final`.)
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/MSQWorkerTaskLauncher.java:
##########
@@ -72,12 +72,17 @@
public class MSQWorkerTaskLauncher implements RetryCapableWorkerManager
{
private static final Logger log = new Logger(MSQWorkerTaskLauncher.class);
- private static final long HIGH_FREQUENCY_CHECK_MILLIS = 100;
- private static final long LOW_FREQUENCY_CHECK_MILLIS = 2000;
- private static final long SWITCH_TO_LOW_FREQUENCY_CHECK_AFTER_MILLIS = 10000;
- private static final long SHUTDOWN_TIMEOUT_MILLIS =
Duration.ofMinutes(1).toMillis();
+
private int currentRelaunchCount = 0;
+ public static class MSQWorkerTaskLauncherConfig
+ {
+ public long highFrequenceCheckMillis = 100;
+ public long lowFrequenceCheckMillis = 2000;
Review Comment:
`Frequency` (spelling)
##########
extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/test/MSQTestControllerContext.java:
##########
@@ -353,13 +354,19 @@ public WorkerManager newWorkerManager(
WorkerFailureListener workerFailureListener
)
{
+ MSQWorkerTaskLauncherConfig taskLauncherConfig = new
MSQWorkerTaskLauncherConfig();
+ taskLauncherConfig.highFrequenceCheckMillis = 0;
Review Comment:
`0` means busy loop, which seems excessive; how about `1`?
--
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]