Skip to content

Commit

Permalink
Merge pull request mesos#549 from CodingCat/deadcode_master. Closes m…
Browse files Browse the repository at this point in the history
…esos#549.

remove actorToWorker in master.scala, which is actually not used

actorToWorker is actually not used in the code....just remove it

Author: CodingCat <zhunansjtu@gmail.com>

== Merge branch commits ==

commit 52656c2d4bbf9abcd8bef65d454badb9cb14a32c
Author: CodingCat <zhunansjtu@gmail.com>
Date:   Thu Feb 6 00:28:26 2014 -0500

    remove actorToWorker in master.scala, which is actually not used
  • Loading branch information
CodingCat authored and rxin committed Feb 6, 2014
1 parent cc14ba9 commit 18c4ee7
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ private[spark] class Master(host: String, port: Int, webUiPort: Int) extends Act

val workers = new HashSet[WorkerInfo]
val idToWorker = new HashMap[String, WorkerInfo]
val actorToWorker = new HashMap[ActorRef, WorkerInfo]
val addressToWorker = new HashMap[Address, WorkerInfo]

val apps = new HashSet[ApplicationInfo]
Expand Down Expand Up @@ -534,7 +533,6 @@ private[spark] class Master(host: String, port: Int, webUiPort: Int) extends Act

workers += worker
idToWorker(worker.id) = worker
actorToWorker(worker.actor) = worker
addressToWorker(workerAddress) = worker
true
}
Expand All @@ -543,7 +541,6 @@ private[spark] class Master(host: String, port: Int, webUiPort: Int) extends Act
logInfo("Removing worker " + worker.id + " on " + worker.host + ":" + worker.port)
worker.setState(WorkerState.DEAD)
idToWorker -= worker.id
actorToWorker -= worker.actor
addressToWorker -= worker.actor.path.address
for (exec <- worker.executors.values) {
logInfo("Telling app of lost executor: " + exec.id)
Expand Down

0 comments on commit 18c4ee7

Please sign in to comment.