Skip to content

Commit

Permalink
Use triple quoted string
Browse files Browse the repository at this point in the history
  • Loading branch information
caneGuy committed Sep 27, 2017
1 parent 2147450 commit 4d906b7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -670,11 +670,12 @@ private[spark] class TaskSetManager(
}
if (blacklistedEverywhere) {
val partition = tasks(indexInTaskSet).partitionId
abort(s"Aborting $taskSet because task $indexInTaskSet (partition $partition) " +
s"cannot run anywhere due to node and executor blacklist.\n" +
s" Most recent failure:\n" +
s" ${taskSetBlacklist.getLatestFailureReason}\n\n" +
s" Blacklisting behavior can be configured via spark.blacklist.*.\n\n")
abort(s"""
|Aborting $taskSet because task $indexInTaskSet (partition $partition)
|cannot run anywhere due to node and executor blacklist.
|Most recent failure:
|${taskSetBlacklist.getLatestFailureReason}\n
|Blacklisting behavior can be configured via spark.blacklist.*.\n""".stripMargin)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -660,11 +660,13 @@ class TaskSchedulerImplSuite extends SparkFunSuite with LocalSparkContext with B
assert(tsm.isZombie)
assert(failedTaskSet)
val idx = failedTask.index
assert(failedTaskSetReason === s"Aborting TaskSet 0.0 because task $idx (partition $idx) " +
s"cannot run anywhere due to node and executor blacklist.\n" +
s" Most recent failure:\n" +
s" ${tsm.taskSetBlacklistHelperOpt.get.getLatestFailureReason}\n\n" +
s" Blacklisting behavior can be configured via spark.blacklist.*.\n\n")
assert(failedTaskSetReason === s"""
|Aborting $taskSet because task $idx (partition $idx)
|cannot run anywhere due to node and executor blacklist.
|Most recent failure:
|${tsm.taskSetBlacklistHelperOpt.get.getLatestFailureReason}\n
|Blacklisting behavior can be configured via spark.blacklist.*.\n""".stripMargin)

}

test("don't abort if there is an executor available, though it hasn't had scheduled tasks yet") {
Expand Down

0 comments on commit 4d906b7

Please sign in to comment.