kfaraz commented on code in PR #18163:
URL: https://github.com/apache/druid/pull/18163#discussion_r2159836584
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:
##########
@@ -970,13 +975,16 @@ 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")
);
- log.info("Created worker pool with [%d] threads for supervisor[%s] for
dataSource[%s]", workerThreads, this.supervisorId, this.dataSource);
+ executor.setKeepAliveTime(KEEPALIVE_TIME_SECONDS, TimeUnit.SECONDS);
+
+ this.workerExec = MoreExecutors.listeningDecorator(executor);
+ log.info(
+ "Created worker pool with [%d] threads for supervisor[%s] for
dataSource[%s]",
+ workerThreads, this.supervisorId, this.dataSource);
Review Comment:
```suggestion
"Created worker pool with [%d] threads for supervisor[%s],
dataSource[%s].",
workerThreads, this.supervisorId, this.dataSource
);
```
--
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]