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
fc78f67d
Commit
fc78f67d
authored
11 years ago
by
Kay Ousterhout
Browse files
Options
Downloads
Patches
Plain Diff
Added logging of scheduler delays to UI
parent
2fead510
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala
+31
-2
31 additions, 2 deletions
core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala
with
31 additions
and
2 deletions
core/src/main/scala/org/apache/spark/ui/jobs/StagePage.scala
+
31
−
2
View file @
fc78f67d
...
...
@@ -60,11 +60,13 @@ private[spark] class StagePage(parent: JobProgressUI) {
var
activeTime
=
0L
listener
.
stageIdToTasksActive
(
stageId
).
foreach
(
activeTime
+=
_
.
timeRunning
(
now
))
val
finishedTasks
=
listener
.
stageIdToTaskInfos
(
stageId
).
filter
(
_
.
_1
.
finished
)
val
summary
=
<
div
>
<
ul
class
=
"unstyled"
>
<
li
>
<
strong
>
CPU
time
:
</strong>
<
strong
>
Total
duration
across
all
tasks
:
</strong>
{
parent.formatDuration
(
listener.stageIdToTime.getOrElse
(
stageId
,
0
L
)
+
activeTime
)}
</
li
>
{
if
(
hasShuffleRead
)
...
...
@@ -104,6 +106,30 @@ private[spark] class StagePage(parent: JobProgressUI) {
val
serviceQuantiles
=
"Duration"
+:
Distribution
(
serviceTimes
).
get
.
getQuantiles
().
map
(
ms
=>
parent
.
formatDuration
(
ms
.
toLong
))
val
gettingResultTimes
=
validTasks
.
map
{
case
(
info
,
metrics
,
exception
)
=>
if
(
info
.
gettingResultTime
>
0
)
{
(
info
.
finishTime
-
info
.
gettingResultTime
).
toDouble
}
else
{
0.0
}
}
val
gettingResultQuantiles
=
(
"Time spent fetching task results"
+:
Distribution
(
gettingResultTimes
).
get
.
getQuantiles
().
map
(
millis
=>
parent
.
formatDuration
(
millis
.
toLong
)))
// The scheduler delay includes the network delay to send the task to the worker
// machine and to send back the result (but not the time to fetch the task result,
// if it needed to be fetched from the block manager on the worker).
val
schedulerDelays
=
validTasks
.
map
{
case
(
info
,
metrics
,
exception
)
=>
if
(
info
.
gettingResultTime
>
0
)
{
(
info
.
gettingResultTime
-
info
.
launchTime
).
toDouble
}
else
{
(
info
.
finishTime
-
info
.
launchTime
).
toDouble
}
}
val
schedulerDelayQuantiles
=
(
"Scheduler delay"
+:
Distribution
(
schedulerDelays
).
get
.
getQuantiles
().
map
(
millis
=>
parent
.
formatDuration
(
millis
.
toLong
)))
def
getQuantileCols
(
data
:
Seq
[
Double
])
=
Distribution
(
data
).
get
.
getQuantiles
().
map
(
d
=>
Utils
.
bytesToString
(
d
.
toLong
))
...
...
@@ -119,7 +145,10 @@ private[spark] class StagePage(parent: JobProgressUI) {
}
val
shuffleWriteQuantiles
=
"Shuffle Write"
+:
getQuantileCols
(
shuffleWriteSizes
)
val
listings
:
Seq
[
Seq
[
String
]]
=
Seq
(
serviceQuantiles
,
val
listings
:
Seq
[
Seq
[
String
]]
=
Seq
(
serviceQuantiles
,
gettingResultQuantiles
,
schedulerDelayQuantiles
,
if
(
hasShuffleRead
)
shuffleReadQuantiles
else
Nil
,
if
(
hasShuffleWrite
)
shuffleWriteQuantiles
else
Nil
)
...
...
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