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
9f2dbb2a
Commit
9f2dbb2a
authored
11 years ago
by
Karen Feng
Browse files
Options
Downloads
Patches
Plain Diff
Adds/removes active tasks only once
parent
0200801a
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/exec/ExecutorsUI.scala
+4
-4
4 additions, 4 deletions
core/src/main/scala/spark/ui/exec/ExecutorsUI.scala
with
4 additions
and
4 deletions
core/src/main/scala/spark/ui/exec/ExecutorsUI.scala
+
4
−
4
View file @
9f2dbb2a
...
...
@@ -94,7 +94,7 @@ private[spark] class ExecutorsUI(val sc: SparkContext) {
val
memUsed
=
sc
.
getExecutorStorageStatus
(
a
).
memUsed
().
toString
val
maxMem
=
sc
.
getExecutorStorageStatus
(
a
).
maxMem
.
toString
val
diskUsed
=
sc
.
getExecutorStorageStatus
(
a
).
diskUsed
().
toString
val
activeTasks
=
listener
.
executorToTasksActive
.
getOrElse
(
a
.
toString
,
0
)
.
toString
val
activeTasks
=
listener
.
executorToTasksActive
.
getOrElse
(
a
.
toString
,
Seq
[
Long
]()).
size
.
toString
val
failedTasks
=
listener
.
executorToTasksFailed
.
getOrElse
(
a
.
toString
,
0
).
toString
val
completedTasks
=
listener
.
executorToTasksComplete
.
getOrElse
(
a
.
toString
,
0
).
toString
val
totalTasks
=
listener
.
executorToTaskInfos
(
a
.
toString
).
size
.
toString
...
...
@@ -114,7 +114,7 @@ private[spark] class ExecutorsUI(val sc: SparkContext) {
}
private
[
spark
]
class
ExecutorsListener
extends
SparkListener
with
Logging
{
val
executorToTasksActive
=
HashMap
[
String
,
Int
]()
val
executorToTasksActive
=
HashMap
[
String
,
Seq
[
Long
]
]()
val
executorToTasksComplete
=
HashMap
[
String
,
Int
]()
val
executorToTasksFailed
=
HashMap
[
String
,
Int
]()
val
executorToTaskInfos
=
...
...
@@ -122,12 +122,12 @@ private[spark] class ExecutorsUI(val sc: SparkContext) {
override
def
onTaskStart
(
taskStart
:
SparkListenerTaskStart
)
{
val
eid
=
taskStart
.
taskInfo
.
executorId
executorToTasksActive
(
eid
)
=
executorToTasksActive
.
getOrElse
(
eid
,
0
)
+
1
executorToTasksActive
(
eid
)
=
executorToTasksActive
.
getOrElse
(
eid
,
Seq
[
Long
]()
)
:
+
taskStart
.
taskInfo
.
taskId
}
override
def
onTaskEnd
(
taskEnd
:
SparkListenerTaskEnd
)
{
val
eid
=
taskEnd
.
taskInfo
.
executorId
executorToTasksActive
(
eid
)
=
executorToTasksActive
.
getOrElse
(
eid
,
0
)
-
1
executorToTasksActive
(
eid
)
=
executorToTasksActive
.
getOrElse
(
eid
,
Seq
[
Long
]()).
filterNot
(
_
==
taskEnd
.
taskInfo
.
taskId
)
val
(
failureInfo
,
metrics
)
:
(
Option
[
ExceptionFailure
],
Option
[
TaskMetrics
])
=
taskEnd
.
reason
match
{
case
e
:
ExceptionFailure
=>
...
...
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