kfaraz commented on code in PR #16887:
URL: https://github.com/apache/druid/pull/16887#discussion_r1721219127


##########
services/src/main/java/org/apache/druid/cli/CliPeon.java:
##########
@@ -205,7 +223,67 @@ public void configure(Properties properties)
   protected List<? extends Module> getModules()
   {
     return ImmutableList.of(
-        new DruidProcessingModule(),
+        Modules.override(new DruidProcessingModule()).with(
+            new Module()
+            {
+              @Override
+              public void configure(Binder binder)
+              {
+
+              }
+
+              @Provides
+              @ManageLifecycle
+              public QueryProcessingPool getProcessingExecutorPool(
+                  Task task,
+                  DruidProcessingConfig config,
+                  ExecutorServiceMonitor executorServiceMonitor,
+                  Lifecycle lifecycle
+              )
+              {
+                if (!task.supportsQueries()) {
+                  return new ForwardingQueryProcessingPool(Execs.dummy());
+                }
+                return new MetricsEmittingQueryProcessingPool(
+                    PrioritizedExecutorService.create(
+                        lifecycle,
+                        config
+                    ),
+                    executorServiceMonitor
+                );

Review Comment:
   
https://github.com/apache/druid/blob/2198001930c01f3da7efea3c3bad57b9e94cf370/processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/GroupByMergingQueryRunner.java#L214
   
   This is one usage of the processing pool as an executor service. Its javadoc 
also mentions such usages
   
   
https://github.com/apache/druid/blob/2198001930c01f3da7efea3c3bad57b9e94cf370/processing/src/main/java/org/apache/druid/query/QueryProcessingPool.java#L31-L34
   
   I think a cleaner design would have been to have a method `getExecutor()` in 
the `QueryProcessingPool` interface. But since this is an `@ExtensionPoint`, I 
suppose we should leave it as is for now.



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