Skip to content
Snippets Groups Projects
Commit aea25482 authored by Ryan Williams's avatar Ryan Williams Committed by Andrew Or
Browse files

[SPARK-5402] log executor ID at executor-construction time

also rename "slaveHostname" to "executorHostname"

Author: Ryan Williams <ryan.blake.williams@gmail.com>

Closes #4195 from ryan-williams/exec and squashes the following commits:

e60a7bb [Ryan Williams] log executor ID at executor-construction time
parent 2d9887ba
No related branches found
No related tags found
No related merge requests found
...@@ -41,11 +41,14 @@ import org.apache.spark.util.{SparkUncaughtExceptionHandler, AkkaUtils, Utils} ...@@ -41,11 +41,14 @@ import org.apache.spark.util.{SparkUncaughtExceptionHandler, AkkaUtils, Utils}
*/ */
private[spark] class Executor( private[spark] class Executor(
executorId: String, executorId: String,
slaveHostname: String, executorHostname: String,
env: SparkEnv, env: SparkEnv,
isLocal: Boolean = false) isLocal: Boolean = false)
extends Logging extends Logging
{ {
logInfo(s"Starting executor ID $executorId on host $executorHostname")
// Application dependencies (added through SparkContext) that we've fetched so far on this node. // Application dependencies (added through SparkContext) that we've fetched so far on this node.
// Each map holds the master's timestamp for the version of that file or JAR we got. // Each map holds the master's timestamp for the version of that file or JAR we got.
private val currentFiles: HashMap[String, Long] = new HashMap[String, Long]() private val currentFiles: HashMap[String, Long] = new HashMap[String, Long]()
...@@ -58,12 +61,12 @@ private[spark] class Executor( ...@@ -58,12 +61,12 @@ private[spark] class Executor(
@volatile private var isStopped = false @volatile private var isStopped = false
// No ip or host:port - just hostname // No ip or host:port - just hostname
Utils.checkHost(slaveHostname, "Expected executed slave to be a hostname") Utils.checkHost(executorHostname, "Expected executed slave to be a hostname")
// must not have port specified. // must not have port specified.
assert (0 == Utils.parseHostPort(slaveHostname)._2) assert (0 == Utils.parseHostPort(executorHostname)._2)
// Make sure the local hostname we report matches the cluster scheduler's name for this host // Make sure the local hostname we report matches the cluster scheduler's name for this host
Utils.setCustomHostname(slaveHostname) Utils.setCustomHostname(executorHostname)
if (!isLocal) { if (!isLocal) {
// Setup an uncaught exception handler for non-local mode. // Setup an uncaught exception handler for non-local mode.
......
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