FrankChen021 commented on code in PR #18210:
URL: https://github.com/apache/druid/pull/18210#discussion_r2199919048


##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java:
##########
@@ -521,9 +521,19 @@ int waitForTaskProcessToComplete(Task task, ProcessHolder 
processHolder, File lo
     finally {
       Thread.currentThread().setName(priorThreadName);
         // Upload task logs
-      taskLogPusher.pushTaskLog(task.getId(), logFile);
+      try {
+        taskLogPusher.pushTaskLog(task.getId(), logFile);
+      }
+      catch (IOException e) {
+        LOGGER.error("Task[%s] failed to push task logs to [%s]", 
task.getId(), logFile.getName());
+      }
       if (reportsFile.exists()) {
-        taskLogPusher.pushTaskReports(task.getId(), reportsFile);
+        try {
+          taskLogPusher.pushTaskReports(task.getId(), reportsFile);
+        }
+        catch (IOException e) {
+          LOGGER.error("Task[%s] failed to push task reports to [%s]", 
task.getId(), reportsFile.getName());

Review Comment:
   it's better to log the exception message



##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java:
##########
@@ -521,9 +521,19 @@ int waitForTaskProcessToComplete(Task task, ProcessHolder 
processHolder, File lo
     finally {
       Thread.currentThread().setName(priorThreadName);
         // Upload task logs
-      taskLogPusher.pushTaskLog(task.getId(), logFile);
+      try {
+        taskLogPusher.pushTaskLog(task.getId(), logFile);
+      }
+      catch (IOException e) {
+        LOGGER.error("Task[%s] failed to push task logs to [%s]", 
task.getId(), logFile.getName());

Review Comment:
   it's better to log the exception message



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