Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangxb1987 committed Jun 29, 2017
1 parent 80884b7 commit 4b6729a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4b6729a

Please sign in to comment.