waitinfuture commented on code in PR #2609:
URL: https://github.com/apache/celeborn/pull/2609#discussion_r1676838998


##########
client-spark/spark-2/src/main/java/org/apache/spark/shuffle/celeborn/SparkUtils.java:
##########
@@ -136,6 +136,11 @@ public static int celebornShuffleId(
     }
   }
 
+  public static int getMapAttemptNumber(TaskContext context) {
+    assert (context.stageAttemptNumber() < (1 << 15) && 
context.attemptNumber() < (1 << 16));
+    return (context.stageAttemptNumber() << 16) | context.attemptNumber();
+  }
+

Review Comment:
   Hi @mridulm ,
   > Irrespective of determinism level, spark will rerun all tasks 
   IIUC, this statement refers to upstream stage, right? Say task 1 in stage 1 
encounters fetch failure, spark will rerun all tasks in the upstream stage 0 
because celeborn unregisters all output. When spark returns to stage 1, it will 
only rerun the failed tasks (in this example task 1), the stage attempt number 
increases, but the task attempt number of the rerun task1 starts with 0, is 
this understanding correct? (I'm not 100 percent sure)



##########
client-spark/spark-2/src/main/java/org/apache/spark/shuffle/celeborn/SparkUtils.java:
##########
@@ -136,6 +136,11 @@ public static int celebornShuffleId(
     }
   }
 
+  public static int getMapAttemptNumber(TaskContext context) {
+    assert (context.stageAttemptNumber() < (1 << 15) && 
context.attemptNumber() < (1 << 16));
+    return (context.stageAttemptNumber() << 16) | context.attemptNumber();
+  }
+

Review Comment:
   Hi @mridulm ,
   > Irrespective of determinism level, spark will rerun all tasks 
   
   IIUC, this statement refers to upstream stage, right? Say task 1 in stage 1 
encounters fetch failure, spark will rerun all tasks in the upstream stage 0 
because celeborn unregisters all output. When spark returns to stage 1, it will 
only rerun the failed tasks (in this example task 1), the stage attempt number 
increases, but the task attempt number of the rerun task1 starts with 0, is 
this understanding correct? (I'm not 100 percent sure)



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