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
12ff0d2d
Commit
12ff0d2d
authored
14 years ago
by
Ankur Dave
Browse files
Options
Downloads
Patches
Plain Diff
Bring an entry back into memory after fetching it from disk
parent
e30313aa
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/DiskSpillingCache.scala
+3
-3
3 additions, 3 deletions
core/src/main/scala/spark/DiskSpillingCache.scala
with
3 additions
and
3 deletions
core/src/main/scala/spark/DiskSpillingCache.scala
+
3
−
3
View file @
12ff0d2d
...
...
@@ -27,6 +27,7 @@ class DiskSpillingCache extends BoundedMemoryCache {
val
timeTaken
=
System
.
currentTimeMillis
-
startTime
logInfo
(
"Reading key %s of size %d bytes from disk took %d ms"
.
format
(
key
,
file
.
length
,
timeTaken
))
super
.
put
(
key
,
bytes
)
ser
.
deserialize
(
bytes
.
asInstanceOf
[
Array
[
Byte
]])
case
_
=>
// not found
...
...
@@ -42,9 +43,8 @@ class DiskSpillingCache extends BoundedMemoryCache {
}
/**
* Spill least recently used entries to disk until at least space
* bytes are free. Assumes that a lock is held on the DiskSpillingCache.
* Assumes that entry.value is a byte array.
* Spill the given entry to disk. Assumes that a lock is held on the
* DiskSpillingCache. Assumes that entry.value is a byte array.
*/
override
protected
def
dropEntry
(
key
:
Any
,
entry
:
Entry
)
{
logInfo
(
"Spilling key %s of size %d to make space"
.
format
(
...
...
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