You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/06/08 08:33:11 UTC

[GitHub] [druid] kfaraz commented on a diff in pull request #12592: ForkingTaskRunner: Set ActiveProcessorCount for tasks.

kfaraz commented on code in PR #12592:
URL: https://github.com/apache/druid/pull/12592#discussion_r892067534


##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java:
##########
@@ -635,7 +646,7 @@ public Optional<ScalingStats> getScalingStats()
   @Override
   public void start()

Review Comment:
   Probably needs to be annotated with `@LifecycleStart`. I wonder if just annotating the interface method `TaskRunner.start()` would work so that the implementations don't need to worry about this.



##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java:
##########
@@ -214,6 +218,13 @@ public TaskStatus call()
                         command.add("-cp");
                         command.add(taskClasspath);
 
+                        if (numProcessorsPerTask < 1) {

Review Comment:
   Nit: Is this really needed? Won't `TaskRunner.run()` always be called after the lifecycle start method?



##########
indexing-service/src/test/java/org/apache/druid/indexing/overlord/ForkingTaskRunnerTest.java:
##########
@@ -373,6 +375,7 @@ int waitForTaskProcessToComplete(Task task, ProcessHolder processHolder, File lo
       }
     };
 
+    forkingTaskRunner.setNumProcessorsPerTask();

Review Comment:
   Could we call `forkingTaskRunner.start()` here instead to avoid exposing the `setNumProcessorsPerTask()` as a `@VisibleForTesting` method?



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

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


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