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
75d161b3
Commit
75d161b3
authored
11 years ago
by
Patrick Wendell
Browse files
Options
Downloads
Patches
Plain Diff
Forcing shuffle consolidation in DiskBlockManagerSuite
parent
1450b8ef
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/test/scala/org/apache/spark/storage/DiskBlockManagerSuite.scala
+12
-2
12 additions, 2 deletions
...cala/org/apache/spark/storage/DiskBlockManagerSuite.scala
with
12 additions
and
2 deletions
core/src/test/scala/org/apache/spark/storage/DiskBlockManagerSuite.scala
+
12
−
2
View file @
75d161b3
...
...
@@ -5,9 +5,9 @@ import java.io.{FileWriter, File}
import
scala.collection.mutable
import
com.google.common.io.Files
import
org.scalatest.
{
BeforeAndAfterEach
,
FunSuite
}
import
org.scalatest.
{
BeforeAndAfterAll
,
BeforeAndAfterEach
,
FunSuite
}
class
DiskBlockManagerSuite
extends
FunSuite
with
BeforeAndAfterEach
{
class
DiskBlockManagerSuite
extends
FunSuite
with
BeforeAndAfterEach
with
BeforeAndAfterAll
{
val
rootDir0
=
Files
.
createTempDir
()
rootDir0
.
deleteOnExit
()
...
...
@@ -16,6 +16,12 @@ class DiskBlockManagerSuite extends FunSuite with BeforeAndAfterEach {
val
rootDirs
=
rootDir0
.
getName
+
","
+
rootDir1
.
getName
println
(
"Created root dirs: "
+
rootDirs
)
// This suite focuses primarily on consolidation features,
// so we coerce consolidation if not already enabled.
val
consolidateProp
=
"spark.shuffle.consolidateFiles"
val
oldConsolidate
=
Option
(
System
.
getProperty
(
consolidateProp
))
System
.
setProperty
(
consolidateProp
,
"true"
)
val
shuffleBlockManager
=
new
ShuffleBlockManager
(
null
)
{
var
idToSegmentMap
=
mutable
.
Map
[
ShuffleBlockId
,
FileSegment
]()
override
def
getBlockLocation
(
id
:
ShuffleBlockId
)
=
idToSegmentMap
(
id
)
...
...
@@ -23,6 +29,10 @@ class DiskBlockManagerSuite extends FunSuite with BeforeAndAfterEach {
var
diskBlockManager
:
DiskBlockManager
=
_
override
def
afterAll
()
{
oldConsolidate
.
map
(
c
=>
System
.
setProperty
(
consolidateProp
,
c
))
}
override
def
beforeEach
()
{
diskBlockManager
=
new
DiskBlockManager
(
shuffleBlockManager
,
rootDirs
)
shuffleBlockManager
.
idToSegmentMap
.
clear
()
...
...
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