kfaraz commented on code in PR #18163:
URL: https://github.com/apache/druid/pull/18163#discussion_r2161657631
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:
##########
@@ -970,13 +965,17 @@ public SeekableStreamSupervisor(
);
}
- this.workerExec = MoreExecutors.listeningDecorator(
- ScheduledExecutors.fixed(
- workerThreads,
- StringUtils.encodeForFormat(supervisorTag) + "-Worker-%d"
- )
+ ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(
+ workerThreads,
+ Execs.makeThreadFactory(StringUtils.encodeForFormat(supervisorTag) +
"-Worker-%d")
+ );
+ executor.setKeepAliveTime(WORKER_THREAD_KEEPALIVE_TIME_SECONDS,
TimeUnit.SECONDS);
Review Comment:
Can this be passed in the constructor itself? Is there any harm to setting
this after the object has been constructed?
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:
##########
@@ -970,13 +965,17 @@ public SeekableStreamSupervisor(
);
}
- this.workerExec = MoreExecutors.listeningDecorator(
- ScheduledExecutors.fixed(
- workerThreads,
- StringUtils.encodeForFormat(supervisorTag) + "-Worker-%d"
- )
+ ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(
+ workerThreads,
+ Execs.makeThreadFactory(StringUtils.encodeForFormat(supervisorTag) +
"-Worker-%d")
+ );
+ executor.setKeepAliveTime(WORKER_THREAD_KEEPALIVE_TIME_SECONDS,
TimeUnit.SECONDS);
Review Comment:
Can this be passed in the constructor itself? Is there any drawback in
setting this after the object has been constructed?
--
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]