Skip to content

Commit

Permalink
Reword some log messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcelo Vanzin committed Jun 22, 2018
1 parent 503852f commit 47131c5
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ object DataWritingSparkTask extends Logging {
val coordinator = SparkEnv.get.outputCommitCoordinator
val commitAuthorized = coordinator.canCommit(stageId, stageAttempt, partId, attemptId)
if (commitAuthorized) {
logInfo(s"Writer for stage $stageId.$stageAttempt, " +
s"task $partId.$attemptId is authorized to commit.")
logInfo(s"Commit authorized for partition $partId (task $taskId, attempt $attemptId" +
s"stage $stageId.$stageAttempt)")
dataWriter.commit()
} else {
val message = s"Stage $stageId.$stageAttempt, " +
s"task $partId.$attemptId: driver did not authorize commit"
val message = s"Commit denied for partition $partId (task $taskId, attempt $attemptId" +
s"stage $stageId.$stageAttempt)"
logInfo(message)
// throwing CommitDeniedException will trigger the catch block for abort
throw new CommitDeniedException(message, stageId, partId, attemptId)
Expand All @@ -140,15 +140,18 @@ object DataWritingSparkTask extends Logging {
dataWriter.commit()
}

logInfo(s"Writer for stage $stageId, task $partId.$attemptId committed.")
logInfo(s"Committed partition $partId (task $taskId, attempt $attemptId" +
s"stage $stageId.$stageAttempt)")

msg

})(catchBlock = {
// If there is an error, abort this writer
logError(s"Writer for stage $stageId, task $partId.$attemptId is aborting.")
logError(s"Aborting commit for partition $partId (task $taskId, attempt $attemptId" +
s"stage $stageId.$stageAttempt)")
dataWriter.abort()
logError(s"Writer for stage $stageId, task $partId.$attemptId aborted.")
logError(s"Aborted commit for partition $partId (task $taskId, attempt $attemptId" +
s"stage $stageId.$stageAttempt)")
})
}
}
Expand Down

0 comments on commit 47131c5

Please sign in to comment.