osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] drcrallen commented on a change in pull request #5913: Move Caching Cluster Client to java streams and allow parallel intermediate merges


drcrallen commented on a change in pull request #5913: Move Caching Cluster Client to java streams and allow parallel intermediate merges
URL: https://github.com/apache/incubator-druid/pull/5913#discussion_r202756791
 
 

 ##########
 File path: java-util/src/main/java/io/druid/java/util/common/concurrent/Execs.java
 ##########
 @@ -147,4 +151,30 @@ public void rejectedExecution(Runnable r, ThreadPoolExecutor executor)
         }
     );
   }
+
+  private static final LongAdder fjpWorkerThreadCount = new LongAdder();
+
+  public static ForkJoinWorkerThread makeWorkerThread(String name, ForkJoinPool pool)
+  {
+    final FJPWorkerThread t = new FJPWorkerThread(pool);
+    t.setDaemon(true);
+    fjpWorkerThreadCount.increment();
+    t.setName(StringUtils.nonStrictFormat(name, fjpWorkerThreadCount.longValue()));
+    return t;
+  }
+
+  static class FJPWorkerThread extends ForkJoinWorkerThread
 
 Review comment:
   Early on I was considering modifying the fork join pool used here to support prioritization as per the prioritized executor service, so I had this class as a placeholder for such a scenario. Since that fell by the wayside due to lack of need for now, I'll remove this and use the standard class until such a time to where prioritization can be properly implemented and tested

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@xxxxxxxxxxxxxxxx


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxx