cryptoe commented on code in PR #13846:
URL: https://github.com/apache/druid/pull/13846#discussion_r1119598582


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/WorkerMemoryParameters.java:
##########
@@ -200,15 +207,30 @@ public static WorkerMemoryParameters 
createProductionInstanceForWorker(
    *                                  the task capacity.
    * @param numProcessingThreadsInJvm size of the processing thread pool in 
the JVM.
    * @param numInputWorkers           number of workers across input stages 
that need to be merged together.
+   * @param totalLookUpFootprint      estimated size of the lookups loaded by 
the process.
    */
   public static WorkerMemoryParameters createInstance(
       final long maxMemoryInJvm,
-      final long usableMemoryInJvm,
       final int numWorkersInJvm,
       final int numProcessingThreadsInJvm,
-      final int numInputWorkers
+      final int numInputWorkers,
+      final long totalLookUpFootprint
   )
   {
+    Preconditions.checkArgument(maxMemoryInJvm > 0, "Max memory passed: [%s] 
should be > 0", maxMemoryInJvm);
+    Preconditions.checkArgument(numWorkersInJvm > 0, "Number of workers: [%s] 
in jvm should be > 0", numWorkersInJvm);

Review Comment:
   Guava Preconditions check does not support %d hence had to change it to %s.
   ```
   
   expression – a boolean expression errorMessageTemplate – a template for the 
exception message should the check fail. The message is formed by replacing 
each %s placeholder in the template with an argument. These are matched by 
position - the first %s gets errorMessageArgs[0], etc. Unmatched arguments will 
be appended to the formatted message in square braces. Unmatched placeholders 
will be left as-is.
   
   ``` 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to