kfaraz commented on code in PR #17431:
URL: https://github.com/apache/druid/pull/17431#discussion_r1820088696
##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/common/KubernetesPeonClient.java:
##########
@@ -266,7 +267,7 @@ Pod getPeonPodWithRetries(KubernetesClient client, String
jobName, int quietTrie
);
}
catch (Exception e) {
- throw new KubernetesResourceNotFoundException("K8s pod with label:
job-name=" + jobName + " not found");
+ throw DruidException.defensive(e, "Error when looking for K8s pod with
label: job-name=" + jobName);
Review Comment:
```suggestion
throw DruidException.defensive(e, "Error when looking for K8s pod with
label: job-name=%s", jobName);
```
##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/KubernetesPeonLifecycle.java:
##########
@@ -318,22 +319,19 @@ protected void saveLogs()
{
try {
Path file = Files.createTempFile(taskId.getOriginalTaskId(), "log");
+ InputStream logStream;
Review Comment:
`logStream` can be final and better be declared inside the `try`.
--
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]