You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/12/23 23:07:47 UTC

[GitHub] [pinot] Jackie-Jiang commented on a change in pull request #7945: Fix QuerySchedulerFactory to plug in custom scheduler

Jackie-Jiang commented on a change in pull request #7945:
URL: https://github.com/apache/pinot/pull/7945#discussion_r774806893



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/query/scheduler/QuerySchedulerFactory.java
##########
@@ -89,12 +96,16 @@ public static QueryScheduler create(PinotConfiguration schedulerConfig, QueryExe
 
   @Nullable
   private static QueryScheduler getQuerySchedulerByClassName(String className, PinotConfiguration schedulerConfig,
-      QueryExecutor queryExecutor) {
+      QueryExecutor queryExecutor, ServerMetrics serverMetrics, LongAccumulator latestQueryTime) {
     try {
-      Constructor<?> constructor =
-          Class.forName(className).getDeclaredConstructor(Configuration.class, QueryExecutor.class);
+      Constructor<?> constructor = Class.forName(className)
+          .getDeclaredConstructor(PinotConfiguration.class, QueryExecutor.class, ServerMetrics.class,
+              LongAccumulator.class);
       constructor.setAccessible(true);
-      return (QueryScheduler) constructor.newInstance(schedulerConfig, queryExecutor);
+      QueryScheduler queryScheduler =
+          (QueryScheduler) constructor.newInstance(schedulerConfig, queryExecutor, serverMetrics, latestQueryTime);
+      LOGGER.info("Using {} scheduler", queryScheduler.name());

Review comment:
       Done




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

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



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