leventov commented on a change in pull request #6629: Add support parallel 
combine in brokers
URL: https://github.com/apache/incubator-druid/pull/6629#discussion_r241103207
 
 

 ##########
 File path: processing/src/main/java/org/apache/druid/query/QueryContexts.java
 ##########
 @@ -174,6 +179,35 @@
     }
   }
 
+  private static int checkPositive(String propertyName, int val)
+  {
+    Preconditions.checkArgument(
+        val > 0,
+        "%s should be positive, but [%s]",
+        propertyName,
+        val
+    );
+    return val;
+  }
+
+  /**
+   * Return the configured number of combine threads if any. Others {@link 
#NO_PARALLEL_COMBINE_THREADS}.
+   */
+  public static <T> int getNumBrokerParallelCombineThreads(Query<T> query)
+  {
+    return parseInt(query, NUM_BROKER_PARALLEL_COMBINE_THREADS, 
NO_PARALLEL_COMBINE_THREADS);
 
 Review comment:
   To ensure that all sequences are still processed timely, and efficiently due 
to  good locality (cache utilization, etc) probably the number of sequences 
concurrently processed in such ForkJoinPool should be limited to about nThreads 
* 1.5, where nThreads is the number of threads in the pool.
   
   To ensure that all queries are processed timely too, the sequences could be 
feeded to the ForkJoinPool only from a fixed set of queries, in a round-robin 
fashion. Excess queries are queued.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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