Skip to content

Commit 3a92843

Browse files
committed
Change actor name to sparkDriver and sparkExecutor
Apparently we also hard-code the actor names everywhere, so the scope of this change is a little larger than expected.
1 parent 921363e commit 3a92843

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

core/src/main/scala/org/apache/spark/SparkEnv.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ object SparkEnv extends Logging {
146146
}
147147

148148
val securityManager = new SecurityManager(conf)
149-
val actorSystemName = if (isDriver) "driverActor" else "executorActor"
149+
val actorSystemName = if (isDriver) "sparkDriver" else "sparkExecutor"
150150
val (actorSystem, boundPort) = AkkaUtils.createActorSystem(
151151
actorSystemName, hostname, port, conf, securityManager)
152152

core/src/main/scala/org/apache/spark/scheduler/cluster/SimrSchedulerBackend.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private[spark] class SimrSchedulerBackend(
3838
override def start() {
3939
super.start()
4040

41-
val driverUrl = "akka.tcp://spark@%s:%s/user/%s".format(
41+
val driverUrl = "akka.tcp://sparkDriver@%s:%s/user/%s".format(
4242
sc.conf.get("spark.driver.host"), sc.conf.get("spark.driver.port"),
4343
CoarseGrainedSchedulerBackend.ACTOR_NAME)
4444

core/src/main/scala/org/apache/spark/scheduler/cluster/SparkDeploySchedulerBackend.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private[spark] class SparkDeploySchedulerBackend(
4242
super.start()
4343

4444
// The endpoint for executors to talk to us
45-
val driverUrl = "akka.tcp://spark@%s:%s/user/%s".format(
45+
val driverUrl = "akka.tcp://sparkDriver@%s:%s/user/%s".format(
4646
conf.get("spark.driver.host"), conf.get("spark.driver.port"),
4747
CoarseGrainedSchedulerBackend.ACTOR_NAME)
4848
val args = Seq(driverUrl, "{{EXECUTOR_ID}}", "{{HOSTNAME}}", "{{CORES}}", "{{WORKER_URL}}")

core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/CoarseMesosSchedulerBackend.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ private[spark] class CoarseMesosSchedulerBackend(
130130
}
131131
val command = CommandInfo.newBuilder()
132132
.setEnvironment(environment)
133-
val driverUrl = "akka.tcp://spark@%s:%s/user/%s".format(
133+
val driverUrl = "akka.tcp://sparkDriver@%s:%s/user/%s".format(
134134
conf.get("spark.driver.host"),
135135
conf.get("spark.driver.port"),
136136
CoarseGrainedSchedulerBackend.ACTOR_NAME)

core/src/main/scala/org/apache/spark/util/AkkaUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ private[spark] object AkkaUtils extends Logging {
195195
val driverHost: String = conf.get("spark.driver.host", "localhost")
196196
val driverPort: Int = conf.getInt("spark.driver.port", 7077)
197197
Utils.checkHost(driverHost, "Expected hostname")
198-
val url = s"akka.tcp://spark@$driverHost:$driverPort/user/$name"
198+
val url = s"akka.tcp://sparkDriver@$driverHost:$driverPort/user/$name"
199199
val timeout = AkkaUtils.lookupTimeout(conf)
200200
logInfo(s"Connecting to $name: $url")
201201
Await.result(actorSystem.actorSelection(url).resolveOne(timeout), timeout)

streaming/src/main/scala/org/apache/spark/streaming/receiver/ReceiverSupervisorImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private[streaming] class ReceiverSupervisorImpl(
5656
private val trackerActor = {
5757
val ip = env.conf.get("spark.driver.host", "localhost")
5858
val port = env.conf.getInt("spark.driver.port", 7077)
59-
val url = "akka.tcp://spark@%s:%s/user/ReceiverTracker".format(ip, port)
59+
val url = "akka.tcp://sparkDriver@%s:%s/user/ReceiverTracker".format(ip, port)
6060
env.actorSystem.actorSelection(url)
6161
}
6262

yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class ExecutorLauncher(args: ApplicationMasterArguments, conf: Configuration, sp
229229
sparkConf.set("spark.driver.host", driverHost)
230230
sparkConf.set("spark.driver.port", driverPort.toString)
231231

232-
val driverUrl = "akka.tcp://spark@%s:%s/user/%s".format(
232+
val driverUrl = "akka.tcp://sparkDriver@%s:%s/user/%s".format(
233233
driverHost, driverPort.toString, CoarseGrainedSchedulerBackend.ACTOR_NAME)
234234

235235
actor = actorSystem.actorOf(Props(new MonitorActor(driverUrl)), name = "YarnAM")

yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocationHandler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ private[yarn] class YarnAllocationHandler(
245245
// Deallocate + allocate can result in reusing id's wrongly - so use a different counter
246246
// (executorIdCounter)
247247
val executorId = executorIdCounter.incrementAndGet().toString
248-
val driverUrl = "akka.tcp://spark@%s:%s/user/%s".format(
248+
val driverUrl = "akka.tcp://sparkDriver@%s:%s/user/%s".format(
249249
sparkConf.get("spark.driver.host"), sparkConf.get("spark.driver.port"),
250250
CoarseGrainedSchedulerBackend.ACTOR_NAME)
251251

yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/ExecutorLauncher.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class ExecutorLauncher(args: ApplicationMasterArguments, conf: Configuration, sp
193193
sparkConf.set("spark.driver.host", driverHost)
194194
sparkConf.set("spark.driver.port", driverPort.toString)
195195

196-
val driverUrl = "akka.tcp://spark@%s:%s/user/%s".format(
196+
val driverUrl = "akka.tcp://sparkDriver@%s:%s/user/%s".format(
197197
driverHost, driverPort.toString, CoarseGrainedSchedulerBackend.ACTOR_NAME)
198198

199199
actor = actorSystem.actorOf(Props(new MonitorActor(driverUrl)), name = "YarnAM")

yarn/stable/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocationHandler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ private[yarn] class YarnAllocationHandler(
262262
numExecutorsRunning.decrementAndGet()
263263
} else {
264264
val executorId = executorIdCounter.incrementAndGet().toString
265-
val driverUrl = "akka.tcp://spark@%s:%s/user/%s".format(
265+
val driverUrl = "akka.tcp://sparkDriver@%s:%s/user/%s".format(
266266
sparkConf.get("spark.driver.host"),
267267
sparkConf.get("spark.driver.port"),
268268
CoarseGrainedSchedulerBackend.ACTOR_NAME)

0 commit comments

Comments
 (0)