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
4078623b
Commit
4078623b
authored
12 years ago
by
Charles Reiss
Browse files
Options
Downloads
Patches
Plain Diff
Remove broken attempt to test fetching case.
parent
b0389997
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/spark/MapOutputTrackerSuite.scala
+2
-46
2 additions, 46 deletions
core/src/test/scala/spark/MapOutputTrackerSuite.scala
with
2 additions
and
46 deletions
core/src/test/scala/spark/MapOutputTrackerSuite.scala
+
2
−
46
View file @
4078623b
...
...
@@ -105,52 +105,8 @@ class MapOutputTrackerSuite extends FunSuite with BeforeAndAfter {
masterTracker
.
incrementGeneration
()
slaveTracker
.
updateGeneration
(
masterTracker
.
getGeneration
)
intercept
[
FetchFailedException
]
{
slaveTracker
.
getServerStatuses
(
10
,
0
)
}
}
test
(
"simulatenous fetch fails"
)
{
System
.
clearProperty
(
"spark.master.host"
)
val
dummyActorSystem
=
ActorSystem
(
"testDummy"
)
val
dummyTracker
=
new
MapOutputTracker
(
dummyActorSystem
,
true
)
dummyTracker
.
registerShuffle
(
10
,
1
)
// val compressedSize1000 = MapOutputTracker.compressSize(1000L)
// val size100 = MapOutputTracker.decompressSize(compressedSize1000)
// dummyTracker.registerMapOutput(10, 0, new MapStatus(
// new BlockManagerId("hostA", 1000), Array(compressedSize1000)))
val
serializedMessage
=
dummyTracker
.
getSerializedLocations
(
10
)
val
(
actorSystem
,
boundPort
)
=
AkkaUtils
.
createActorSystem
(
"test"
,
"localhost"
,
0
)
System
.
setProperty
(
"spark.master.port"
,
boundPort
.
toString
)
val
delayResponseLock
=
new
java
.
lang
.
Object
val
delayResponseActor
=
actorSystem
.
actorOf
(
Props
(
new
Actor
{
override
def
receive
=
{
case
GetMapOutputStatuses
(
shuffleId
:
Int
,
requester
:
String
)
=>
delayResponseLock
.
synchronized
{
sender
!
serializedMessage
}
}
}),
name
=
"MapOutputTracker"
)
val
slaveTracker
=
new
MapOutputTracker
(
actorSystem
,
false
)
var
firstFailed
=
false
var
secondFailed
=
false
val
firstFetch
=
new
Thread
{
override
def
run
()
{
intercept
[
FetchFailedException
]
{
slaveTracker
.
getServerStatuses
(
10
,
0
)
}
firstFailed
=
true
}
}
val
secondFetch
=
new
Thread
{
override
def
run
()
{
intercept
[
FetchFailedException
]
{
slaveTracker
.
getServerStatuses
(
10
,
0
)
}
secondFailed
=
true
}
}
delayResponseLock
.
synchronized
{
firstFetch
.
start
secondFetch
.
start
}
firstFetch
.
join
secondFetch
.
join
assert
(
firstFailed
&&
secondFailed
)
// failure should be cached
intercept
[
FetchFailedException
]
{
slaveTracker
.
getServerStatuses
(
10
,
0
)
}
}
}
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