зеркало из https://github.com/microsoft/spark.git
Explain slaveLost calls made by StandaloneSchedulerBackend
This commit is contained in:
Родитель
a4041dd87f
Коммит
829206f1a7
|
@ -69,13 +69,13 @@ class StandaloneSchedulerBackend(scheduler: ClusterScheduler, actorSystem: Actor
|
|||
context.stop(self)
|
||||
|
||||
case Terminated(actor) =>
|
||||
actorToSlaveId.get(actor).foreach(removeSlave)
|
||||
actorToSlaveId.get(actor).foreach(removeSlave(_, "Akka actor terminated"))
|
||||
|
||||
case RemoteClientDisconnected(transport, address) =>
|
||||
addressToSlaveId.get(address).foreach(removeSlave)
|
||||
addressToSlaveId.get(address).foreach(removeSlave(_, "remote Akka client disconnected"))
|
||||
|
||||
case RemoteClientShutdown(transport, address) =>
|
||||
addressToSlaveId.get(address).foreach(removeSlave)
|
||||
addressToSlaveId.get(address).foreach(removeSlave(_, "remote Akka client shutdown"))
|
||||
}
|
||||
|
||||
// Make fake resource offers on all slaves
|
||||
|
@ -99,7 +99,7 @@ class StandaloneSchedulerBackend(scheduler: ClusterScheduler, actorSystem: Actor
|
|||
}
|
||||
|
||||
// Remove a disconnected slave from the cluster
|
||||
def removeSlave(slaveId: String) {
|
||||
def removeSlave(slaveId: String, reason: String) {
|
||||
logInfo("Slave " + slaveId + " disconnected, so removing it")
|
||||
val numCores = freeCores(slaveId)
|
||||
actorToSlaveId -= slaveActor(slaveId)
|
||||
|
@ -109,7 +109,7 @@ class StandaloneSchedulerBackend(scheduler: ClusterScheduler, actorSystem: Actor
|
|||
freeCores -= slaveId
|
||||
slaveHost -= slaveId
|
||||
totalCoreCount.addAndGet(-numCores)
|
||||
scheduler.slaveLost(slaveId, SlaveLost())
|
||||
scheduler.slaveLost(slaveId, SlaveLost(reason))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче