walterddr commented on code in PR #9753:
URL: https://github.com/apache/pinot/pull/9753#discussion_r1019538196


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/service/QueryServer.java:
##########
@@ -42,25 +43,30 @@
 /**
  * {@link QueryServer} is the GRPC server that accepts query plan requests 
sent from {@link QueryDispatcher}.
  */
+@SuppressWarnings("UnstableApiUsage")
 public class QueryServer extends PinotQueryWorkerGrpc.PinotQueryWorkerImplBase 
{
   private static final Logger LOGGER = 
LoggerFactory.getLogger(GrpcQueryServer.class);
 
   private final Server _server;
   private final QueryRunner _queryRunner;
-  private final ExecutorService _executorService;
+  private final OpChainSchedulerService _scheduler;
 
   public QueryServer(int port, QueryRunner queryRunner) {
     _server = ServerBuilder.forPort(port).addService(this).build();
-    _executorService = 
Executors.newFixedThreadPool(ResourceManager.DEFAULT_QUERY_WORKER_THREADS,
-        new NamedThreadFactory("query_worker_on_" + port + "_port"));
+    _scheduler = new OpChainSchedulerService(new RoundRobinScheduler(),
+        Executors.newFixedThreadPool(
+            ResourceManager.DEFAULT_QUERY_WORKER_THREADS,
+            new NamedThreadFactory("query_worker_on_" + port + "_port")));
     _queryRunner = queryRunner;
+
     LOGGER.info("Initialized QueryWorker on port: {} with numWorkerThreads: 
{}", port,
         ResourceManager.DEFAULT_QUERY_WORKER_THREADS);
   }
 
   public void start() {
     LOGGER.info("Starting QueryWorker");
     try {
+      _scheduler.startAsync().awaitRunning();

Review Comment:
   shutdown?



-- 
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-unsubscr...@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to