Skip to content

Commit 4b6729a

Browse files
committed
add comments
1 parent 80884b7 commit 4b6729a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/test/scala/org/apache/spark/scheduler/OutputCommitCoordinatorSuite.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ private case class OutputCommitFunctions(tempDirPath: String) {
269269
isAppend = false)
270270

271271
// Create TaskAttemptContext.
272+
// Hadoop wants a 32-bit task attempt ID, so if ours is bigger than Int.MaxValue, roll it
273+
// around by taking a mod. We expect that no task will be attempted 2 billion times.
272274
val taskAttemptId = (ctx.taskAttemptId % Int.MaxValue).toInt
273275
val attemptId = new TaskAttemptID(
274276
new TaskID(jobId.value, TaskType.MAP, ctx.partitionId), taskAttemptId)

0 commit comments

Comments
 (0)