uds5501 commented on code in PR #18163:
URL: https://github.com/apache/druid/pull/18163#discussion_r2161684923


##########
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?
   
   unfortunately, no. I explored the option but couldn't find any. There's no 
harm in setting this after object creation, the executor does nothing before 
tasks are pushed in its queue.



-- 
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]

Reply via email to