aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/scala/spark/FetchFailedException.scala
blob: a953081d245fab139e944e7217b1d00c7ef37c2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package spark

import spark.storage.BlockManagerId

private[spark] class FetchFailedException(
    val bmAddress: BlockManagerId,
    val shuffleId: Int,
    val mapId: Int,
    val reduceId: Int,
    cause: Throwable)
  extends Exception {
  
  override def getMessage(): String = 
    "Fetch failed: %s %d %d %d".format(bmAddress, shuffleId, mapId, reduceId)

  override def getCause(): Throwable = cause

  def toTaskEndReason: TaskEndReason =
    FetchFailed(bmAddress, shuffleId, mapId, reduceId)
}