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
ebe1efc8
Commit
ebe1efc8
authored
11 years ago
by
Matei Zaharia
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'pwendell/ui-updates'
parents
fd666512
32b9d21a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/src/main/scala/spark/ui/jobs/JobProgressUI.scala
+7
-7
7 additions, 7 deletions
core/src/main/scala/spark/ui/jobs/JobProgressUI.scala
core/src/main/scala/spark/ui/jobs/StagePage.scala
+8
-8
8 additions, 8 deletions
core/src/main/scala/spark/ui/jobs/StagePage.scala
with
15 additions
and
15 deletions
core/src/main/scala/spark/ui/jobs/JobProgressUI.scala
+
7
−
7
View file @
ebe1efc8
...
...
@@ -51,7 +51,7 @@ private[spark] class JobProgressListener extends SparkListener {
val
stageToTasksComplete
=
HashMap
[
Int
,
Int
]()
val
stageToTasksFailed
=
HashMap
[
Int
,
Int
]()
val
stageToTaskInfos
=
HashMap
[
Int
,
ArrayBuffer
[(
TaskInfo
,
TaskMetrics
,
Option
[
ExceptionFailure
])]]()
HashMap
[
Int
,
ArrayBuffer
[(
TaskInfo
,
Option
[
TaskMetrics
]
,
Option
[
ExceptionFailure
])]]()
override
def
onJobStart
(
jobStart
:
SparkListenerJobStart
)
{}
...
...
@@ -78,17 +78,17 @@ private[spark] class JobProgressListener extends SparkListener {
override
def
onTaskEnd
(
taskEnd
:
SparkListenerTaskEnd
)
{
val
sid
=
taskEnd
.
task
.
stageId
val
(
failureInfo
,
metrics
)
:
(
Option
[
ExceptionFailure
],
TaskMetrics
)
=
val
(
failureInfo
,
metrics
)
:
(
Option
[
ExceptionFailure
],
Option
[
TaskMetrics
]
)
=
taskEnd
.
reason
match
{
case
e
:
ExceptionFailure
=>
stageToTasksFailed
(
sid
)
=
stageToTasksFailed
.
getOrElse
(
sid
,
0
)
+
1
(
Some
(
e
),
e
.
metrics
.
get
)
(
Some
(
e
),
e
.
metrics
)
case
_
=>
stageToTasksComplete
(
sid
)
=
stageToTasksComplete
.
getOrElse
(
sid
,
0
)
+
1
(
None
,
taskEnd
.
taskMetrics
)
(
None
,
Some
(
taskEnd
.
taskMetrics
)
)
}
val
taskList
=
stageToTaskInfos
.
getOrElse
(
sid
,
ArrayBuffer
[(
TaskInfo
,
TaskMetrics
,
Option
[
ExceptionFailure
])]())
sid
,
ArrayBuffer
[(
TaskInfo
,
Option
[
TaskMetrics
]
,
Option
[
ExceptionFailure
])]())
taskList
+=
((
taskEnd
.
taskInfo
,
metrics
,
failureInfo
))
stageToTaskInfos
(
sid
)
=
taskList
}
...
...
@@ -111,7 +111,7 @@ private[spark] class JobProgressListener extends SparkListener {
def
hasShuffleRead
(
stageID
:
Int
)
:
Boolean
=
{
// This is written in a slightly complicated way to avoid having to scan all tasks
for
(
s
<-
stageToTaskInfos
.
get
(
stageID
).
getOrElse
(
Seq
()))
{
if
(
s
.
_2
!=
null
)
return
s
.
_2
.
shuffleReadMetrics
.
isDefined
if
(
s
.
_2
!=
null
)
return
s
.
_2
.
flatMap
(
m
=>
m
.
shuffleReadMetrics
)
.
isDefined
}
return
false
// No tasks have finished for this stage
}
...
...
@@ -120,7 +120,7 @@ private[spark] class JobProgressListener extends SparkListener {
def
hasShuffleWrite
(
stageID
:
Int
)
:
Boolean
=
{
// This is written in a slightly complicated way to avoid having to scan all tasks
for
(
s
<-
stageToTaskInfos
.
get
(
stageID
).
getOrElse
(
Seq
()))
{
if
(
s
.
_2
!=
null
)
return
s
.
_2
.
shuffleWriteMetrics
.
isDefined
if
(
s
.
_2
!=
null
)
return
s
.
_2
.
flatMap
(
m
=>
m
.
shuffleWriteMetrics
)
.
isDefined
}
return
false
// No tasks have finished for this stage
}
...
...
This diff is collapsed.
Click to expand it.
core/src/main/scala/spark/ui/jobs/StagePage.scala
+
8
−
8
View file @
ebe1efc8
...
...
@@ -52,7 +52,7 @@ private[spark] class StagePage(parent: JobProgressUI) {
}
else
{
val
serviceTimes
=
validTasks
.
map
{
case
(
info
,
metrics
,
exception
)
=>
metrics
.
executorRunTime
.
toDouble
}
metrics
.
get
.
executorRunTime
.
toDouble
}
val
serviceQuantiles
=
"Duration"
+:
Distribution
(
serviceTimes
).
get
.
getQuantiles
().
map
(
ms
=>
parent
.
formatDuration
(
ms
.
toLong
))
...
...
@@ -61,13 +61,13 @@ private[spark] class StagePage(parent: JobProgressUI) {
val
shuffleReadSizes
=
validTasks
.
map
{
case
(
info
,
metrics
,
exception
)
=>
metrics
.
shuffleReadMetrics
.
map
(
_
.
remoteBytesRead
).
getOrElse
(
0L
).
toDouble
metrics
.
get
.
shuffleReadMetrics
.
map
(
_
.
remoteBytesRead
).
getOrElse
(
0L
).
toDouble
}
val
shuffleReadQuantiles
=
"Shuffle Read (Remote)"
+:
getQuantileCols
(
shuffleReadSizes
)
val
shuffleWriteSizes
=
validTasks
.
map
{
case
(
info
,
metrics
,
exception
)
=>
metrics
.
shuffleWriteMetrics
.
map
(
_
.
shuffleBytesWritten
).
getOrElse
(
0L
).
toDouble
metrics
.
get
.
shuffleWriteMetrics
.
map
(
_
.
shuffleBytesWritten
).
getOrElse
(
0L
).
toDouble
}
val
shuffleWriteQuantiles
=
"Shuffle Write"
+:
getQuantileCols
(
shuffleWriteSizes
)
...
...
@@ -87,21 +87,21 @@ private[spark] class StagePage(parent: JobProgressUI) {
}
def
taskRow
(
taskData
:
(
TaskInfo
,
TaskMetrics
,
Option
[
ExceptionFailure
]))
:
Seq
[
Node
]
=
{
def
taskRow
(
taskData
:
(
TaskInfo
,
Option
[
TaskMetrics
]
,
Option
[
ExceptionFailure
]))
:
Seq
[
Node
]
=
{
def
fmtStackTrace
(
trace
:
Seq
[
StackTraceElement
])
:
Seq
[
Node
]
=
trace
.
map
(
e
=>
<
span
style
=
"display:block;"
>{
e
.
toString
}</
span
>)
val
(
info
,
metrics
,
exception
)
=
taskData
<
tr
>
<
td
>{
info
.
taskId
}</
td
>
<
td
sorttable_customkey
={
Option
(
metrics
)
.
map
{
m
=>
m
.
executorRunTime
.
toString
}.
getOrElse
(
"1"
)}>
{
Option
(
metrics
)
.
map
{
m
=>
parent
.
formatDuration
(
m
.
executorRunTime
)}.
getOrElse
(
""
)}
<
td
sorttable_customkey
={
metrics
.
map
{
m
=>
m
.
executorRunTime
.
toString
}.
getOrElse
(
"1"
)}>
{
metrics
.
map
{
m
=>
parent
.
formatDuration
(
m
.
executorRunTime
)}.
getOrElse
(
""
)}
</
td
>
<
td
>{
info
.
taskLocality
}</
td
>
<
td
>{
info
.
hostPort
}</
td
>
<
td
>{
dateFmt
.
format
(
new
Date
(
info
.
launchTime
))}</
td
>
{
Option
(
metrics
)
.
flatMap
{
m
=>
m
.
shuffleReadMetrics
}.
map
{
s
=>
{
metrics
.
flatMap
{
m
=>
m
.
shuffleReadMetrics
}.
map
{
s
=>
<
td
>{
Utils
.
memoryBytesToString
(
s
.
remoteBytesRead
)}</
td
>}.
getOrElse
(
""
)}
{
Option
(
metrics
)
.
flatMap
{
m
=>
m
.
shuffleWriteMetrics
}.
map
{
s
=>
{
metrics
.
flatMap
{
m
=>
m
.
shuffleWriteMetrics
}.
map
{
s
=>
<
td
>{
Utils
.
memoryBytesToString
(
s
.
shuffleBytesWritten
)}</
td
>}.
getOrElse
(
""
)}
<
td
>{
exception
.
map
(
e
=>
<
span
>
...
...
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