advancedxy commented on code in PR #394:
URL: https://github.com/apache/incubator-uniffle/pull/394#discussion_r1043360817


##########
client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java:
##########
@@ -661,6 +661,7 @@ public void sendAppHeartbeat(String appId, long timeoutMs) {
     });
     try {
       List<Future<Void>> futures = 
heartBeatExecutorService.invokeAll(callableList, timeoutMs, 
TimeUnit.MILLISECONDS);
+      // comment for discuss: due to the documentation of invokeAll, 
Feature.isDone is true for all the returned features.

Review Comment:
   @jerqi  Edited: due to the invokeAll doc, is the if statement in 
`future.isDone` still needed?
   ```
   Executes the given tasks, returning a list of Futures holding their status 
and results when all complete or the timeout expires, whichever happens first. 
Future.isDone is true for each element of the returned list. Upon return, tasks 
that have not completed are cancelled. Note that a completed task could have 
terminated either normally or by throwing an exception. The results of this 
method are undefined if the given collection is modified while this operation 
is in progress.
   Params:
   tasks – the collection of tasks timeout – the maximum time to wait unit – 
the time unit of the timeout argument
   Returns:
   a list of Futures representing the tasks, in the same sequential order as 
produced by the iterator for the given task list. If the operation did not time 
out, each task will have completed. If it did time out, some of these tasks 
will not have completed.
   Throws:
   InterruptedException – if interrupted while waiting, in which case 
unfinished tasks are cancelled
   NullPointerException – if tasks, any of its elements, or unit are null
   RejectedExecutionException – if any task cannot be scheduled for execution
   ```



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