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
ed7ecb93
Commit
ed7ecb93
authored
11 years ago
by
Mark Hamstra
Browse files
Options
Downloads
Patches
Plain Diff
[SPARK-963] Wait for SparkListenerBus eventQueue to be empty before checking jobLogger state
parent
cb976dfb
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/scheduler/JobLoggerSuite.scala
+6
-1
6 additions, 1 deletion
...est/scala/org/apache/spark/scheduler/JobLoggerSuite.scala
with
6 additions
and
1 deletion
core/src/test/scala/org/apache/spark/scheduler/JobLoggerSuite.scala
+
6
−
1
View file @
ed7ecb93
...
...
@@ -31,6 +31,7 @@ import org.apache.spark.rdd.RDD
class
JobLoggerSuite
extends
FunSuite
with
LocalSparkContext
with
ShouldMatchers
{
val
WAIT_TIMEOUT_MILLIS
=
10000
test
(
"inner method"
)
{
sc
=
new
SparkContext
(
"local"
,
"joblogger"
)
...
...
@@ -92,6 +93,8 @@ class JobLoggerSuite extends FunSuite with LocalSparkContext with ShouldMatchers
val
rdd
=
sc
.
parallelize
(
1
to
1
e2
.
toInt
,
4
).
map
{
i
=>
(
i
%
12
,
2
*
i
)
}
rdd
.
reduceByKey
(
_
+
_
).
collect
()
assert
(
sc
.
dagScheduler
.
listenerBus
.
waitUntilEmpty
(
WAIT_TIMEOUT_MILLIS
))
val
user
=
System
.
getProperty
(
"user.name"
,
SparkContext
.
SPARK_UNKNOWN_USER
)
joblogger
.
getLogDir
should
be
(
"/tmp/spark-%s"
.
format
(
user
))
...
...
@@ -120,7 +123,9 @@ class JobLoggerSuite extends FunSuite with LocalSparkContext with ShouldMatchers
sc
.
addSparkListener
(
joblogger
)
val
rdd
=
sc
.
parallelize
(
1
to
1
e2
.
toInt
,
4
).
map
{
i
=>
(
i
%
12
,
2
*
i
)
}
rdd
.
reduceByKey
(
_
+
_
).
collect
()
assert
(
sc
.
dagScheduler
.
listenerBus
.
waitUntilEmpty
(
WAIT_TIMEOUT_MILLIS
))
joblogger
.
onJobStartCount
should
be
(
1
)
joblogger
.
onJobEndCount
should
be
(
1
)
joblogger
.
onTaskEndCount
should
be
(
8
)
...
...
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