Skip to content

Commit

Permalink
Set e as the cause of FetchFailedException
Browse files Browse the repository at this point in the history
  • Loading branch information
zsxwing committed Nov 2, 2014
1 parent b88c919 commit d51b0b6
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,18 @@ private[spark] class FetchFailedException(
mapId: Int,
reduceId: Int,
message: String)
extends Exception {
extends Exception(message) {

def this(bmAddress: BlockManagerId, shuffleId: Int, mapId: Int, reduceId: Int, e: Throwable) {
this(bmAddress, shuffleId, mapId, reduceId, Utils.exceptionString(e))
this(bmAddress, shuffleId, mapId, reduceId, e.getMessage)
initCause(e)
}

override def getMessage: String =
"Fetch failed: %s %d %d %d".format(bmAddress, shuffleId, mapId, reduceId)

def toTaskEndReason: TaskEndReason = FetchFailed(bmAddress, shuffleId, mapId, reduceId, message)
def toTaskEndReason: TaskEndReason = FetchFailed(bmAddress, shuffleId, mapId, reduceId,
Utils.exceptionString(this))
}

/**
Expand Down

0 comments on commit d51b0b6

Please sign in to comment.