YongGang commented on code in PR #16600:
URL: https://github.com/apache/druid/pull/16600#discussion_r1644816541
##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/execution/SelectorBasedPodTemplateSelectStrategy.java:
##########
@@ -64,9 +61,18 @@ public PodTemplate getPodTemplateForTask(Task task,
Map<String, PodTemplate> tem
.filter(selector -> selector.evaluate(task))
.findFirst()
.map(Selector::getSelectionKey)
- .orElse(defaultKey);
+ .orElse("base");
- return templates.getOrDefault(templateKey, templates.get("base"));
+ PodTemplate podTemplate = templates.getOrDefault(templateKey,
templates.get("base"));
Review Comment:
A non-null `podTemplate` will always be returned in this line of code as
when loading templates it will make sure `base` template get configured
[here](https://github.com/apache/druid/blob/master/extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/taskadapter/PodTemplateTaskAdapter.java#L234)
--
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]