@@ -26,10 +26,10 @@ import scala.concurrent.Await
26
26
import akka .actor ._
27
27
import akka .pattern .ask
28
28
29
- import org .apache .spark .util ._
30
29
import org .apache .spark .scheduler .MapStatus
31
30
import org .apache .spark .shuffle .MetadataFetchFailedException
32
31
import org .apache .spark .storage .BlockManagerId
32
+ import org .apache .spark .util ._
33
33
34
34
private [spark] sealed trait MapOutputTrackerMessage
35
35
private [spark] case class GetMapOutputStatuses (shuffleId : Int )
@@ -107,14 +107,17 @@ private[spark] abstract class MapOutputTracker(conf: SparkConf) extends Logging
107
107
Await .result(future, timeout)
108
108
} catch {
109
109
case e : Exception =>
110
+ logError(" Error communicating with MapOutputTracker" , e)
110
111
throw new SparkException (" Error communicating with MapOutputTracker" , e)
111
112
}
112
113
}
113
114
114
115
/** Send a one-way message to the trackerActor, to which we expect it to reply with true. */
115
116
protected def sendTracker (message : Any ) {
116
- if (askTracker(message) != true ) {
117
- throw new SparkException (" Error reply received from MapOutputTracker" )
117
+ val response = askTracker(message)
118
+ if (response != true ) {
119
+ throw new SparkException (
120
+ " Error reply received from MapOutputTracker. Expecting true, got " + response.toString)
118
121
}
119
122
}
120
123
@@ -366,9 +369,9 @@ private[spark] object MapOutputTracker {
366
369
// any of the statuses is null (indicating a missing location due to a failed mapper),
367
370
// throw a FetchFailedException.
368
371
private def convertMapStatuses (
369
- shuffleId : Int ,
370
- reduceId : Int ,
371
- statuses : Array [MapStatus ]): Array [(BlockManagerId , Long )] = {
372
+ shuffleId : Int ,
373
+ reduceId : Int ,
374
+ statuses : Array [MapStatus ]): Array [(BlockManagerId , Long )] = {
372
375
assert (statuses != null )
373
376
statuses.map {
374
377
status =>
@@ -403,7 +406,7 @@ private[spark] object MapOutputTracker {
403
406
if (compressedSize == 0 ) {
404
407
0
405
408
} else {
406
- math.pow(LOG_BASE , ( compressedSize & 0xFF ) ).toLong
409
+ math.pow(LOG_BASE , compressedSize & 0xFF ).toLong
407
410
}
408
411
}
409
412
}
0 commit comments