mayankshriv commented on a change in pull request #6044:
URL: https://github.com/apache/incubator-pinot/pull/6044#discussion_r503637680
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/query/reduce/BrokerReduceService.java
##########
@@ -47,8 +57,32 @@
@ThreadSafe
public class BrokerReduceService {
+ private static final Logger LOGGER =
LoggerFactory.getLogger(BrokerReduceService.class);
+
+ // brw -> Shorthand for broker reduce worker threads.
+ private static final String REDUCE_THREAD_NAME_FORMAT = "brw-%d";
+ protected static final int QUERY_RUNNER_THREAD_PRIORITY = 7;
+
+ private final ListeningExecutorService _reduceExecutorService;
+ private final int _maxReduceThreadsPerQuery;
+
+ public BrokerReduceService(PinotConfiguration config) {
+ _maxReduceThreadsPerQuery =
config.getProperty(CommonConstants.Broker.CONFIG_OF_MAX_REDUCE_THREADS_PER_QUERY,
+ CommonConstants.Broker.MAX_REDUCE_THREADS_PER_QUERY);
+ LOGGER.info("Initializing BrokerReduceService with {} reduce threads.",
_maxReduceThreadsPerQuery);
Review comment:
Initially, I had Guava's `MoreExecutor.directorExecutor()` that uses the
current thread to run the task, in case of single thread. I decided to just
keep it simple and have the exact same code in case of single vs multi-thread
(with exception of index table). We can revisit that if needed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]