Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
829206f1
Commit
829206f1
authored
12 years ago
by
Charles Reiss
Browse files
Options
Downloads
Patches
Plain Diff
Explain slaveLost calls made by StandaloneSchedulerBackend
parent
a4041dd8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/src/main/scala/spark/scheduler/cluster/StandaloneSchedulerBackend.scala
+5
-5
5 additions, 5 deletions
.../spark/scheduler/cluster/StandaloneSchedulerBackend.scala
with
5 additions
and
5 deletions
core/src/main/scala/spark/scheduler/cluster/StandaloneSchedulerBackend.scala
+
5
−
5
View file @
829206f1
...
...
@@ -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
))
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment