turboFei commented on code in PR #3556:
URL: https://github.com/apache/celeborn/pull/3556#discussion_r2594619688


##########
client-spark/spark-3/src/main/java/org/apache/spark/shuffle/celeborn/SparkUtils.java:
##########
@@ -399,6 +404,39 @@ protected static Tuple2<TaskInfo, List<TaskInfo>> 
getTaskAttempts(
     }
   }
 
+  /**
+   * Gets the number of task attempts that have already failed for the given 
task index. Note: This
+   * count does NOT include the current failure. To get the total failure 
count including the
+   * current attempt, you need to add 1 to the returned value.
+   *
+   * @param taskSetManager the TaskSetManager to query
+   * @param index the task index
+   * @return the number of previous failed attempts, or -1 if an error occurs
+   */
+  @VisibleForTesting
+  protected static int getTaskFailureCount(TaskSetManager taskSetManager, int 
index) {

Review Comment:
   I saw it is VisibleForTesting.
   
   Could you test it in the UT?



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

Reply via email to