[SPARK-13522][CORE] Fix the exit log place for heartbeat

## What changes were proposed in this pull request?

Just fixed the log place introduced by #11401

## How was this patch tested?

unit tests.

Author: Shixiong Zhu <shixiong@databricks.com>

Closes #11432 from zsxwing/SPARK-13522-follow-up.
This commit is contained in:
Shixiong Zhu 2016-02-29 11:52:11 -08:00 committed by Andrew Or
parent 17a253cbf4
commit 644dbb641a

View file

@ -478,9 +478,10 @@ private[spark] class Executor(
} catch { } catch {
case NonFatal(e) => case NonFatal(e) =>
logWarning("Issue communicating with driver in heartbeater", e) logWarning("Issue communicating with driver in heartbeater", e)
logError(s"Unable to send heartbeats to driver more than $HEARTBEAT_MAX_FAILURES times")
heartbeatFailures += 1 heartbeatFailures += 1
if (heartbeatFailures >= HEARTBEAT_MAX_FAILURES) { if (heartbeatFailures >= HEARTBEAT_MAX_FAILURES) {
logError(s"Exit as unable to send heartbeats to driver " +
s"more than $HEARTBEAT_MAX_FAILURES times")
System.exit(ExecutorExitCode.HEARTBEAT_FAILURE) System.exit(ExecutorExitCode.HEARTBEAT_FAILURE)
} }
} }