Skip to content

Commit 815de54

Browse files
YanTangZhaiJoshRosen
authored andcommitted
[SPARK-4946] [CORE] Using AkkaUtils.askWithReply in MapOutputTracker.askTracker to reduce the chance of the communicating problem
Using AkkaUtils.askWithReply in MapOutputTracker.askTracker to reduce the chance of the communicating problem Author: YanTangZhai <hakeemzhai@tencent.com> Author: yantangzhai <tyz0303@163.com> Closes apache#3785 from YanTangZhai/SPARK-4946 and squashes the following commits: 9ca6541 [yantangzhai] [SPARK-4946] [CORE] Using AkkaUtils.askWithReply in MapOutputTracker.askTracker to reduce the chance of the communicating problem e4c2c0a [YanTangZhai] Merge pull request #15 from apache/master 718afeb [YanTangZhai] Merge pull request #12 from apache/master 6e643f8 [YanTangZhai] Merge pull request #11 from apache/master e249846 [YanTangZhai] Merge pull request #10 from apache/master d26d982 [YanTangZhai] Merge pull request #9 from apache/master 76d4027 [YanTangZhai] Merge pull request #8 from apache/master 03b62b0 [YanTangZhai] Merge pull request #7 from apache/master 8a00106 [YanTangZhai] Merge pull request #6 from apache/master cbcba66 [YanTangZhai] Merge pull request #3 from apache/master cdef539 [YanTangZhai] Merge pull request #1 from apache/master
1 parent 4cef05e commit 815de54

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)