kfaraz commented on code in PR #14714:
URL: https://github.com/apache/druid/pull/14714#discussion_r1281393955


##########
extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3TaskLogs.java:
##########
@@ -87,38 +92,42 @@ public Optional<InputStream> streamTaskStatus(String 
taskid) throws IOException
   private Optional<InputStream> streamTaskFile(final long offset, String 
taskKey) throws IOException

Review Comment:
   It might be nicer to just add a new method `streamTaskFileWithRetry`, which 
calls the existing `streamTaskFile`.
   
   something like:
   ```java
   private Optional<InputStream> streamTaskFileWithRetry(final long offset, 
String taskKey)
   {
     try {
       return S3Utils.retryOperation(() -> streamTaskFile(offset, taskKey))
     }
     catch (Exception e) {
       throw new IOE(e, "Failed to stream logs from: %s", taskKey);
     }
   }
   ```
   
   The new method can also have a javadoc to mention which failure cases are 
retried.



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