Skip to content

Commit 9ca6541

Browse files
committed
[SPARK-4946] [CORE] Using AkkaUtils.askWithReply in MapOutputTracker.askTracker to reduce the chance of the communicating problem
1 parent e4c2c0a commit 9ca6541

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/main/scala/org/apache/spark/MapOutputTracker.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ private[spark] class MapOutputTrackerMasterActor(tracker: MapOutputTrackerMaster
7676
*/
7777
private[spark] abstract class MapOutputTracker(conf: SparkConf) extends Logging {
7878
private val timeout = AkkaUtils.askTimeout(conf)
79+
private val retryAttempts = AkkaUtils.numRetries(conf)
80+
private val retryIntervalMs = AkkaUtils.retryWaitMs(conf)
7981

8082
/** Set to the MapOutputTrackerActor living on the driver. */
8183
var trackerActor: ActorRef = _
@@ -108,8 +110,7 @@ private[spark] abstract class MapOutputTracker(conf: SparkConf) extends Logging
108110
*/
109111
protected def askTracker(message: Any): Any = {
110112
try {
111-
val future = trackerActor.ask(message)(timeout)
112-
Await.result(future, timeout)
113+
AkkaUtils.askWithReply(message, trackerActor, retryAttempts, retryIntervalMs, timeout)
113114
} catch {
114115
case e: Exception =>
115116
logError("Error communicating with MapOutputTracker", e)

0 commit comments

Comments
 (0)