georgew5656 commented on code in PR #14285:
URL: https://github.com/apache/druid/pull/14285#discussion_r1198132410
##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/KubernetesPeonLifecycle.java:
##########
@@ -265,14 +268,32 @@ private TaskStatus getTaskStatus(long duration)
return taskStatus.withDuration(duration);
}
- private void saveLogs()
+ protected void startWatchingLogs()
+ {
+ if (logWatch != null) {
+ log.debug("There is already a log watcher for %s",
taskId.getOriginalTaskId());
+ return;
+ }
+ try {
+ Optional<LogWatch> maybeLogWatch =
kubernetesClient.getPeonLogWatcher(taskId);
+ if (maybeLogWatch.isPresent()) {
+ logWatch = maybeLogWatch.get();
+ }
+ }
+ catch (Exception e) {
+ log.error(e, "Error watching logs from task: %s", taskId);
+ }
+ }
+
+ protected void saveLogs()
Review Comment:
hmm yeah i guess this makes sense if the k8s api throws an error or
something, we would probably still want to try pushing logs
--
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]