diff options
author | Denny <dennybritz@gmail.com> | 2012-09-04 21:15:23 -0700 |
---|---|---|
committer | Denny <dennybritz@gmail.com> | 2012-09-04 21:15:23 -0700 |
commit | 9326509f66d659219924e1e9235f4560986dc579 (patch) | |
tree | cf5f0957ca6ac5fea9a6162952866c6c936539ff | |
parent | 1588d4dbe6574aa293df0b087cf2609575e187b7 (diff) | |
download | spark-9326509f66d659219924e1e9235f4560986dc579.tar.gz spark-9326509f66d659219924e1e9235f4560986dc579.tar.bz2 spark-9326509f66d659219924e1e9235f4560986dc579.zip |
Delete old DeployUtils.
-rw-r--r-- | core/src/main/scala/spark/deploy/DeployUtils.scala | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/core/src/main/scala/spark/deploy/DeployUtils.scala b/core/src/main/scala/spark/deploy/DeployUtils.scala deleted file mode 100644 index 602ba6ecb0..0000000000 --- a/core/src/main/scala/spark/deploy/DeployUtils.scala +++ /dev/null @@ -1,53 +0,0 @@ -package spark.deploy - -import akka.actor.{ActorRef, Props, Actor, ActorSystem, Terminated} - -import spark.deploy.worker.Worker -import spark.deploy.master.Master -import spark.util.AkkaUtils -import spark.{Logging, Utils} - -import scala.collection.mutable.ArrayBuffer - -object DeployUtils extends Logging { - - /* Starts a local standalone Spark cluster with a specified number of slaves */ - def startLocalSparkCluster(numSlaves : Int, coresPerSlave : Int, - memoryPerSlave : Int) : String = { - - logInfo("Starting a local Spark cluster with " + numSlaves + " slaves.") - - val threadPool = Utils.newDaemonFixedThreadPool(numSlaves + 1) - val localIpAddress = Utils.localIpAddress - val workers = ArrayBuffer[ActorRef]() - - /* Start the Master */ - val (actorSystem, boundPort) = AkkaUtils.createActorSystem("sparkMaster", localIpAddress, 0) - val masterUrl = "spark://" + localIpAddress + ":" + boundPort - threadPool.execute(new Runnable { - def run() { - val actor = actorSystem.actorOf( - Props(new Master(localIpAddress, boundPort, 8080)), name = "Master") - actorSystem.awaitTermination() - } - }) - - /* Start the Slaves */ - (1 to numSlaves + 1).foreach { slaveNum => - val (actorSystem, boundPort) = - AkkaUtils.createActorSystem("sparkWorker" + slaveNum, localIpAddress, 0) - threadPool.execute(new Runnable { - def run() { - val actor = actorSystem.actorOf( - Props(new Worker(localIpAddress, boundPort, 8080 + slaveNum, coresPerSlave, memoryPerSlave, masterUrl)), - name = "Worker") - workers += actor - actorSystem.awaitTermination() - } - }) - } - - return masterUrl - } - -}
\ No newline at end of file |