You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "yihua (via GitHub)" <gi...@apache.org> on 2023/04/11 08:32:42 UTC

[GitHub] [hudi] yihua commented on a diff in pull request #8335: [HUDI-6009] Let the jetty server in TimelineService create daemon threads

yihua commented on code in PR #8335:
URL: https://github.com/apache/hudi/pull/8335#discussion_r1154788747


##########
hudi-timeline-service/src/main/java/org/apache/hudi/timeline/service/TimelineService.java:
##########
@@ -342,8 +343,26 @@ private int startServiceOnPort(int port) throws IOException {
   }
 
   public int startService() throws IOException {
-    final Server server = timelineServerConf.numThreads == DEFAULT_NUM_THREADS ? new JettyServer(new JavalinConfig()).server() :
-            new Server(new QueuedThreadPool(timelineServerConf.numThreads));
+    int maxThreads;
+    if (timelineServerConf.numThreads > 0) {
+      maxThreads = timelineServerConf.numThreads;
+    } else {
+      // io.javalin.jetty.JettyUtil.defaultThreadPool
+      maxThreads = 250;

Review Comment:
   Can we directly use constant from `JettyUtil`?



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org