From 4b6729a76f4ef53b6bb742d7ec8be60e1bb7c640 Mon Sep 17 00:00:00 2001 From: Xingbo Jiang Date: Thu, 29 Jun 2017 21:17:43 +0800 Subject: [PATCH] add comments --- .../apache/spark/scheduler/OutputCommitCoordinatorSuite.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/test/scala/org/apache/spark/scheduler/OutputCommitCoordinatorSuite.scala b/core/src/test/scala/org/apache/spark/scheduler/OutputCommitCoordinatorSuite.scala index 82d4276a938bf..1579b614ea5b0 100644 --- a/core/src/test/scala/org/apache/spark/scheduler/OutputCommitCoordinatorSuite.scala +++ b/core/src/test/scala/org/apache/spark/scheduler/OutputCommitCoordinatorSuite.scala @@ -269,6 +269,8 @@ private case class OutputCommitFunctions(tempDirPath: String) { isAppend = false) // Create TaskAttemptContext. + // Hadoop wants a 32-bit task attempt ID, so if ours is bigger than Int.MaxValue, roll it + // around by taking a mod. We expect that no task will be attempted 2 billion times. val taskAttemptId = (ctx.taskAttemptId % Int.MaxValue).toInt val attemptId = new TaskAttemptID( new TaskID(jobId.value, TaskType.MAP, ctx.partitionId), taskAttemptId)