Skip to content
Snippets Groups Projects
Commit d79238d0 authored by Sandy Ryza's avatar Sandy Ryza Committed by Patrick Wendell
Browse files

SPARK-3612. Executor shouldn't quit if heartbeat message fails to reach ...

...the driver

Author: Sandy Ryza <sandy@cloudera.com>

Closes #2487 from sryza/sandy-spark-3612 and squashes the following commits:

2b7353d [Sandy Ryza] SPARK-3612. Executor shouldn't quit if heartbeat message fails to reach the driver
parent 8dfe79ff
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,7 @@ import java.util.concurrent._ ...@@ -24,6 +24,7 @@ import java.util.concurrent._
import scala.collection.JavaConversions._ import scala.collection.JavaConversions._
import scala.collection.mutable.{ArrayBuffer, HashMap} import scala.collection.mutable.{ArrayBuffer, HashMap}
import scala.util.control.NonFatal
import org.apache.spark._ import org.apache.spark._
import org.apache.spark.deploy.SparkHadoopUtil import org.apache.spark.deploy.SparkHadoopUtil
...@@ -375,12 +376,17 @@ private[spark] class Executor( ...@@ -375,12 +376,17 @@ private[spark] class Executor(
} }
val message = Heartbeat(executorId, tasksMetrics.toArray, env.blockManager.blockManagerId) val message = Heartbeat(executorId, tasksMetrics.toArray, env.blockManager.blockManagerId)
val response = AkkaUtils.askWithReply[HeartbeatResponse](message, heartbeatReceiverRef, try {
retryAttempts, retryIntervalMs, timeout) val response = AkkaUtils.askWithReply[HeartbeatResponse](message, heartbeatReceiverRef,
if (response.reregisterBlockManager) { retryAttempts, retryIntervalMs, timeout)
logWarning("Told to re-register on heartbeat") if (response.reregisterBlockManager) {
env.blockManager.reregister() logWarning("Told to re-register on heartbeat")
env.blockManager.reregister()
}
} catch {
case NonFatal(t) => logWarning("Issue communicating with driver in heartbeater", t)
} }
Thread.sleep(interval) Thread.sleep(interval)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment