Jackie-Jiang commented on a change in pull request #4773: Enhance 
CombineOperator
URL: https://github.com/apache/incubator-pinot/pull/4773#discussion_r342741374
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/operator/CombineOperator.java
 ##########
 @@ -47,22 +45,16 @@
   private static final Logger LOGGER = 
LoggerFactory.getLogger(CombineOperator.class);
   private static final String OPERATOR_NAME = "CombineOperator";
 
+  // Use at most 10 or half of the processors threads for each query.
+  // If there are less than 2 processors, use 1 thread.
+  // Runtime.getRuntime().availableProcessors() may return value < 2 in 
container based environment, e.g. Kubernetes.
+  private static final int MAX_NUM_THREADS_PER_QUERY =
+      Math.max(1, Math.min(10, Runtime.getRuntime().availableProcessors() / 
2));
 
 Review comment:
   That I'm not sure and we need to test that out. Based on Xiang's experience, 
Kubernetes might return 1 for this, and that is the reason why we ensure this 
value is at least 1

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to