georgew5656 commented on code in PR #16510:
URL: https://github.com/apache/druid/pull/16510#discussion_r1624642794


##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/taskadapter/PodTemplateTaskAdapter.java:
##########
@@ -126,7 +132,19 @@ public PodTemplateTaskAdapter(
   @Override
   public Job fromTask(Task task) throws IOException
   {
-    PodTemplate podTemplate = templates.getOrDefault(task.getType(), 
templates.get("base"));
+    ExecutionBehaviorStrategy behaviorStrategy;
+    ExecutionConfig executionConfig = executionConfigRef.get();
+    if (executionConfig == null || executionConfig.getBehaviorStrategy() == 
null) {
+      behaviorStrategy = ExecutionConfig.DEFAULT_STRATEGY;
+    } else {
+      behaviorStrategy = executionConfig.getBehaviorStrategy();
+    }
+    String category = behaviorStrategy.getTaskCategory(task);
+    PodTemplate podTemplate = templates.getOrDefault(
+        category != null ? category : task.getType(),

Review Comment:
   since the default BehaviorStrategy now has the task type behavior 
implemented i think this should just default to the base template if category 
is null



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

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


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

Reply via email to