Skip to content

Commit

Permalink
Add a few miscellaneous ports
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewor14 committed Aug 5, 2014
1 parent 6016e77 commit 9868358
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion core/src/main/scala/org/apache/spark/deploy/Client.scala
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ object Client {
}

val conf = new SparkConf()
val port = conf.getInt("spark.standalone.client.port", 0) // TODO: document this
val driverArgs = new ClientArguments(args)

if (!driverArgs.logLevel.isGreaterOrEqual(Level.WARN)) {
Expand All @@ -158,7 +159,7 @@ object Client {
// TODO: See if we can initialize akka so return messages are sent back using the same TCP
// flow. Else, this (sadly) requires the DriverClient be routable from the Master.
val (actorSystem, _) = AkkaUtils.createActorSystem(
"driverClient", Utils.localHostName(), 0, conf, new SecurityManager(conf))
"driverClient", Utils.localHostName(), port, conf, new SecurityManager(conf))

actorSystem.actorOf(Props(classOf[ClientActor], driverArgs, conf))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ object DriverWrapper {
args.toList match {
case workerUrl :: mainClass :: extraArgs =>
val conf = new SparkConf()
val watcherPort = conf.getInt("spark.worker.watcher.port", 0) // TODO: document this
val (actorSystem, _) = AkkaUtils.createActorSystem("Driver",
Utils.localHostName(), 0, conf, new SecurityManager(conf))
Utils.localHostName(), watcherPort, conf, new SecurityManager(conf))
actorSystem.actorOf(Props(classOf[WorkerWatcher], workerUrl), name = "workerWatcher")

// Delegate to supplied main class
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/scala/org/apache/spark/executor/Executor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ private[spark] class Executor(
// Initialize Spark environment (using system properties read above)
private val env = {
if (!isLocal) {
val _env = SparkEnv.create(conf, executorId, slaveHostname, 0,
val port = conf.getInt("spark.executor.env.port", 0) // TODO: document this
val _env = SparkEnv.create(conf, executorId, slaveHostname, port,
isDriver = false, isLocal = false)
SparkEnv.set(_env)
_env.metricsSystem.registerSource(executorSource)
Expand Down

0 comments on commit 9868358

Please sign in to comment.