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
ca1903ea
Commit
ca1903ea
authored
11 years ago
by
Karen Feng
Browse files
Options
Downloads
Patches
Plain Diff
Overlays progress text on top of bar
parent
099528b6
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/main/scala/spark/ui/jobs/StageTable.scala
+12
-9
12 additions, 9 deletions
core/src/main/scala/spark/ui/jobs/StageTable.scala
with
12 additions
and
9 deletions
core/src/main/scala/spark/ui/jobs/StageTable.scala
+
12
−
9
View file @
ca1903ea
...
...
@@ -37,7 +37,7 @@ private[spark] class StageTable(val stages: Seq[Stage], val parent: JobProgressU
<
th
>
Origin
</
th
>
<
th
>
Submitted
</
th
>
<
td
>
Duration
</
td
>
<
td
colspan
=
"2"
>
Tasks
:
Succeeded/Total</td>
<
td
>
Tasks
:
Succeeded/Total</td>
<td>Shuffle
Read</td>
<td>Shuffle
Write</td>
</thead>
...
...
@@ -54,11 +54,14 @@ private[spark] class StageTable(val stages: Seq[Stage], val parent: JobProgressU
}
}
def
makeProgressBar
(
started
:
Int
,
completed
:
Int
,
total
:
Int
)
:
Seq
[
Node
]
=
{
def
makeProgressBar
(
started
:
Int
,
completed
:
Int
,
failed
:
String
,
total
:
Int
)
:
Seq
[
Node
]
=
{
val
completeWidth
=
"width: %s%%"
.
format
((
completed
.
toDouble
/
total
)*
100
)
val
startWidth
=
"width: %s%%"
.
format
((
started
.
toDouble
/
total
)*
100
)
<
div
class
=
"progress"
style
=
"height: 15px; margin-bottom: 0px"
>
<
div
class
=
"progress"
style
=
"height: 15px; margin-bottom: 0px; position: relative"
>
<
span
style
=
"text-align:center; position:absolute; width:100%;"
>
{
completed
}/{
total
}
{
failed
}
</
span
>
<
div
class
=
"bar"
style
={
completeWidth
}></
div
>
<
div
class
=
"bar bar-info"
style
={
startWidth
}></
div
>
</
div
>
...
...
@@ -82,6 +85,10 @@ private[spark] class StageTable(val stages: Seq[Stage], val parent: JobProgressU
val
startedTasks
=
listener
.
stageToTasksActive
.
getOrElse
(
s
.
id
,
HashSet
[
TaskInfo
]()).
size
val
completedTasks
=
listener
.
stageToTasksComplete
.
getOrElse
(
s
.
id
,
0
)
val
failedTasks
=
listener
.
stageToTasksFailed
.
getOrElse
(
s
.
id
,
0
)
match
{
case
f
if
f
>
0
=>
"(%s failed)"
.
format
(
f
)
case
_
=>
""
}
val
totalTasks
=
s
.
numPartitions
val
poolName
=
listener
.
stageToPool
.
get
(
s
)
...
...
@@ -95,12 +102,8 @@ private[spark] class StageTable(val stages: Seq[Stage], val parent: JobProgressU
<
td
>{
submissionTime
}</
td
>
<
td
>{
getElapsedTime
(
s
.
submissionTime
,
s
.
completionTime
.
getOrElse
(
System
.
currentTimeMillis
()))}</
td
>
<
td
class
=
"progress-cell"
>{
makeProgressBar
(
startedTasks
,
completedTasks
,
totalTasks
)}</
td
>
<
td
style
=
"border-left: 0; text-align: center;"
>{
completedTasks
}
/
{
totalTasks
}
{
listener
.
stageToTasksFailed
.
getOrElse
(
s
.
id
,
0
)
match
{
case
f
if
f
>
0
=>
"(%s failed)"
.
format
(
f
)
case
_
=>
}}
<
td
class
=
"progress-cell"
>
{
makeProgressBar
(
startedTasks
,
completedTasks
,
failedTasks
,
totalTasks
)}
</
td
>
<
td
>{
shuffleRead
}</
td
>
<
td
>{
shuffleWrite
}</
td
>
...
...
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