You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "jin xing (JIRA)" <ji...@apache.org> on 2017/02/02 14:12:51 UTC
[jira] [Created] (SPARK-19437) ExecutorId in HearbeatReceiverSuite
is incorrect.
jin xing created SPARK-19437:
--------------------------------
Summary: ExecutorId in HearbeatReceiverSuite is incorrect.
Key: SPARK-19437
URL: https://issues.apache.org/jira/browse/SPARK-19437
Project: Spark
Issue Type: Bug
Components: Spark Core
Affects Versions: 2.1.0
Reporter: jin xing
The current code in *HeartbeatReceiverSuite*, executorId is set as below:
{code}
private val executorId1 = "executor-1"
private val executorId2 = "executor-2"
{code}
The executorId is sent to driver when register as below:
{code}
test("expire dead hosts should kill executors with replacement (SPARK-8119)") {
...
fakeSchedulerBackend.driverEndpoint.askSync[Boolean](
RegisterExecutor(executorId1, dummyExecutorEndpointRef1, "1.2.3.4", 0, Map.empty))
...
}
{code}
Receiving *RegisterExecutor*, the executorId will be compared with *currentExecutorIdCounter* as below:
{code}
case RegisterExecutor(executorId, executorRef, hostname, cores, logUrls) =>
if (executorDataMap.contains(executorId)) {
executorRef.send(RegisterExecutorFailed("Duplicate executor ID: " + executorId))
context.reply(true)
} else {
...
executorDataMap.put(executorId, data)
if (currentExecutorIdCounter < executorId.toInt) {
currentExecutorIdCounter = executorId.toInt
}
...
{code}
*executorId.toInt* will cause NumberformatException.
This unit test can pass currently because of *askWithRetry*, when catching exception, RPC will call again, thus it will go *if* branch and return true.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org