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
872c97ad
Commit
872c97ad
authored
11 years ago
by
Karen Feng
Browse files
Options
Downloads
Patches
Plain Diff
Split task columns, memory columns sort by numeric value
parent
2eea9747
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/spark/ui/exec/ExecutorsUI.scala
+21
-15
21 additions, 15 deletions
core/src/main/scala/spark/ui/exec/ExecutorsUI.scala
with
21 additions
and
15 deletions
core/src/main/scala/spark/ui/exec/ExecutorsUI.scala
+
21
−
15
View file @
872c97ad
...
@@ -45,15 +45,21 @@ private[spark] class ExecutorsUI(val sc: SparkContext) {
...
@@ -45,15 +45,21 @@ private[spark] class ExecutorsUI(val sc: SparkContext) {
.
reduceOption
(
_
+
_
).
getOrElse
(
0L
)
.
reduceOption
(
_
+
_
).
getOrElse
(
0L
)
val
execHead
=
Seq
(
"Executor ID"
,
"Address"
,
"RDD blocks"
,
"Memory used"
,
"Disk used"
,
val
execHead
=
Seq
(
"Executor ID"
,
"Address"
,
"RDD blocks"
,
"Memory used"
,
"Disk used"
,
"
Tasks: Complete/Total
"
)
"
Failed tasks"
,
"Complete tasks"
,
"Total tasks
"
)
def
execRow
(
kv
:
Seq
[
String
])
=
def
execRow
(
kv
:
Seq
[
String
])
=
<
tr
>
<
tr
>
<
td
>{
kv
(
0
)}</
td
>
<
td
>{
kv
(
0
)}</
td
>
<
td
>{
kv
(
1
)}</
td
>
<
td
>{
kv
(
1
)}</
td
>
<
td
>{
kv
(
2
)}</
td
>
<
td
>{
kv
(
2
)}</
td
>
<
td
>{
kv
(
3
)}</
td
>
<
td
sorttable_customkey
={
kv
(
3
)}>
<
td
>{
kv
(
4
)}</
td
>
{
Utils
.
memoryBytesToString
(
kv
(
3
).
toLong
)}
/
{
Utils
.
memoryBytesToString
(
kv
(
4
).
toLong
)}
<
td
>{
kv
(
5
)}</
td
>
</
td
>
<
td
sorttable_customkey
={
kv
(
5
)}>
{
Utils
.
memoryBytesToString
(
kv
(
5
).
toLong
)}
</
td
>
<
td
>{
kv
(
6
)}</
td
>
<
td
>{
kv
(
7
)}</
td
>
<
td
>{
kv
(
8
)}</
td
>
</
tr
>
</
tr
>
val
execInfo
=
val
execInfo
=
for
(
b
<-
0
until
storageStatusList
.
size
)
for
(
b
<-
0
until
storageStatusList
.
size
)
...
@@ -83,24 +89,24 @@ private[spark] class ExecutorsUI(val sc: SparkContext) {
...
@@ -83,24 +89,24 @@ private[spark] class ExecutorsUI(val sc: SparkContext) {
def
getExecInfo
(
a
:
Int
)
:
Seq
[
String
]
=
{
def
getExecInfo
(
a
:
Int
)
:
Seq
[
String
]
=
{
val
execId
=
sc
.
getExecutorStorageStatus
(
a
).
blockManagerId
.
executorId
val
execId
=
sc
.
getExecutorStorageStatus
(
a
).
blockManagerId
.
executorId
val
hostPort
=
sc
.
getExecutorStorageStatus
(
a
).
blockManagerId
.
hostPort
val
hostPort
=
sc
.
getExecutorStorageStatus
(
a
).
blockManagerId
.
hostPort
val
memUsed
=
Utils
.
memoryBytesToString
(
sc
.
getExecutorStorageStatus
(
a
).
memUsed
())
val
maxMem
=
Utils
.
memoryBytesToString
(
sc
.
getExecutorStorageStatus
(
a
).
maxMem
)
val
diskUsed
=
Utils
.
memoryBytesToString
(
sc
.
getExecutorStorageStatus
(
a
).
diskUsed
())
val
rddBlocks
=
sc
.
getExecutorStorageStatus
(
a
).
blocks
.
size
.
toString
val
rddBlocks
=
sc
.
getExecutorStorageStatus
(
a
).
blocks
.
size
.
toString
val
completedTasks
=
listener
.
executorToTasksComplete
.
getOrElse
(
a
.
toString
,
0
)
val
memUsed
=
sc
.
getExecutorStorageStatus
(
a
).
memUsed
()
.
toString
val
totalTasks
=
listener
.
executorToTaskInfos
(
a
.
toString
).
size
val
maxMem
=
sc
.
getExecutorStorageStatus
(
a
).
maxMem
.
toString
val
failedTasks
=
listener
.
executorToTasksFailed
.
getOrElse
(
a
.
toString
,
0
)
match
{
val
diskUsed
=
sc
.
getExecutorStorageStatus
(
a
).
diskUsed
().
toString
case
f
if
f
>
0
=>
" (%s failed)"
.
format
(
f
)
val
failedTasks
=
listener
.
executorToTasksFailed
.
getOrElse
(
a
.
toString
,
0
).
toString
case
_
=>
""
val
completedTasks
=
listener
.
executorToTasksComplete
.
getOrElse
(
a
.
toString
,
0
).
toString
}
val
totalTasks
=
listener
.
executorToTaskInfos
(
a
.
toString
).
size
.
toString
Seq
(
Seq
(
execId
,
execId
,
hostPort
,
hostPort
,
rddBlocks
,
rddBlocks
,
"%s / %s"
.
format
(
memUsed
,
maxMem
),
memUsed
,
maxMem
,
diskUsed
,
diskUsed
,
"%s / %s"
.
format
(
completedTasks
,
totalTasks
)
+
failedTasks
failedTasks
,
completedTasks
,
totalTasks
)
)
}
}
...
...
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