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


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

Review Comment:
   It would be cool to make this another kind of behavior, and have it be 
default. That would be clean



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