Skip to content

Commit

Permalink
Fix an instance where full standalone mode executor IDs were passed to
Browse files Browse the repository at this point in the history
StandaloneSchedulerBackend instead of the smaller IDs used within Spark
(that lack the application name).

This was reported by ClearStory in
alteryx/spark#9.

Also fixed some messages that said slave instead of executor.
  • Loading branch information
mateiz committed Sep 9, 2013
1 parent 0b95799 commit f9b7f58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ private[spark] class ClusterTaskSetManager(
}

/**
* Respond to an offer of a single slave from the scheduler by finding a task
* Respond to an offer of a single executor from the scheduler by finding a task
*/
override def resourceOffer(
execId: String,
Expand All @@ -358,7 +358,7 @@ private[spark] class ClusterTaskSetManager(
val task = tasks(index)
val taskId = sched.newTaskId()
// Figure out whether this should count as a preferred launch
logInfo("Starting task %s:%d as TID %s on slave %s: %s (%s)".format(
logInfo("Starting task %s:%d as TID %s on executor %s: %s (%s)".format(
taskSet.id, index, taskId, execId, host, taskLocality))
// Do various bookkeeping
copiesRunning(index) += 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ private[spark] class SparkDeploySchedulerBackend(
}
}

override def executorAdded(executorId: String, workerId: String, hostPort: String, cores: Int, memory: Int) {
override def executorAdded(fullId: String, workerId: String, hostPort: String, cores: Int, memory: Int) {
logInfo("Granted executor ID %s on hostPort %s with %d cores, %s RAM".format(
executorId, hostPort, cores, Utils.megabytesToString(memory)))
fullId, hostPort, cores, Utils.megabytesToString(memory)))
}

override def executorRemoved(executorId: String, message: String, exitStatus: Option[Int]) {
override def executorRemoved(fullId: String, message: String, exitStatus: Option[Int]) {
val reason: ExecutorLossReason = exitStatus match {
case Some(code) => ExecutorExited(code)
case None => SlaveLost(message)
}
logInfo("Executor %s removed: %s".format(executorId, message))
removeExecutor(executorId, reason.toString)
logInfo("Executor %s removed: %s".format(fullId, message))
removeExecutor(fullId.split("/")(1), reason.toString)
}
}

0 comments on commit f9b7f58

Please sign in to comment.