gianm commented on PR #18766:
URL: https://github.com/apache/druid/pull/18766#issuecomment-3722903833

   IMO it's overkill to add a metric to the task log pusher, so I went the 
route of adding a new utility. The call site looks like this:
   
   ```
       final Optional<InputStream> streamOptional =
           cluster.callApi().waitForResult(
               () -> overlord.bindings()
                             .getInstance(TaskLogStreamer.class)
                             .streamTaskLog(taskId, 0),
               Optional::isPresent
           ).go();
   ```
   
   The reason for the extra `.go()` is that the thing returned by 
`waitForResult` is like a builder. It has methods like `withTimeoutMillis` etc.


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