Github user tgravescs commented on a diff in the pull request:
https://github.com/apache/spark/pull/21606#discussion_r197451756
--- Diff:
core/src/main/scala/org/apache/spark/internal/io/SparkHadoopWriter.scala ---
@@ -76,13 +76,17 @@ object SparkHadoopWriter extends Logging {
// Try to write all RDD partitions as a Hadoop OutputFormat.
try {
val ret = sparkContext.runJob(rdd, (context: TaskContext, iter:
Iterator[(K, V)]) => {
+ // SPARK-24552: Generate a unique "task ID" based on the stage and
task atempt numbers.
+ // Assumes that there won't be more than Short.MaxValue attempts,
at least not concurrently.
+ val taskId = (context.stageAttemptNumber << 16) |
context.attemptNumber
--- End diff --
perhaps we should rename taskId to be something more unique so we don't
confuse it
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]