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
aca8150c
Commit
aca8150c
authored
13 years ago
by
Matei Zaharia
Browse files
Options
Downloads
Patches
Plain Diff
Ensure that AddedToCache messages make it home before tasks finish
parent
16c886a5
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/RDDCache.scala
+5
-3
5 additions, 3 deletions
core/src/main/scala/spark/RDDCache.scala
with
5 additions
and
3 deletions
core/src/main/scala/spark/RDDCache.scala
+
5
−
3
View file @
aca8150c
...
...
@@ -28,11 +28,12 @@ class RDDCacheTracker extends DaemonActor with Logging {
case
RegisterRDD
(
rddId
:
Int
,
numPartitions
:
Int
)
=>
logInfo
(
"Registering RDD "
+
rddId
+
" with "
+
numPartitions
+
" partitions"
)
locs
(
rddId
)
=
Array
.
fill
[
List
[
String
]](
numPartitions
)(
Nil
)
reply
(
""
)
reply
(
'OK
)
case
AddedToCache
(
rddId
,
partition
,
host
)
=>
logInfo
(
"Cache entry added: (%s, %s) on %s"
.
format
(
rddId
,
partition
,
host
))
locs
(
rddId
)(
partition
)
=
host
::
locs
(
rddId
)(
partition
)
reply
(
'OK
)
case
DroppedFromCache
(
rddId
,
partition
,
host
)
=>
logInfo
(
"Cache entry removed: (%s, %s) on %s"
.
format
(
rddId
,
partition
,
host
))
...
...
@@ -123,7 +124,7 @@ private object RDDCache extends Logging {
// If we got here, we have to load the split
// Tell the master that we're doing so
val
host
=
System
.
getProperty
(
"spark.hostname"
,
Utils
.
localHostName
)
trackerActor
!
AddedToCache
(
rdd
.
id
,
split
.
index
,
host
)
val
future
=
trackerActor
!
!
AddedToCache
(
rdd
.
id
,
split
.
index
,
host
)
// TODO: fetch any remote copy of the split that may be available
// TODO: also register a listener for when it unloads
logInfo
(
"Computing partition "
+
split
)
...
...
@@ -133,7 +134,8 @@ private object RDDCache extends Logging {
loading
.
remove
(
key
)
loading
.
notifyAll
()
}
future
.
apply
()
// Wait for the reply from the cache tracker
return
Iterator
.
fromArray
(
array
)
}
}
}
\ No newline at end of file
}
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