New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-34898][CORE] We should log SparkListenerExecutorMetricsUpdateEvent of driver
appropriately when spark.eventLog.logStageExecutorMetrics
is true
#31992
Conversation
… EventLog of `driver` appropriately
Test build #136645 has finished for PR 31992 at commit
|
cc @Ngone51 FYI |
Test build #136646 has finished for PR 31992 at commit
|
Test build #136653 has started for PR 31992 at commit |
Kubernetes integration test starting |
Kubernetes integration test status failure |
Kubernetes integration test starting |
Kubernetes integration test status failure |
Kubernetes integration test starting |
Kubernetes integration test status failure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who is consuming this event in spark ?
Btw, if all you want is monitor jvm stats (outside of spark ui), use codahale integration instead ?
core/src/test/scala/org/apache/spark/scheduler/EventLoggingListenerSuite.scala
Outdated
Show resolved
Hide resolved
@@ -249,6 +249,9 @@ private[spark] class EventLoggingListener( | |||
} | |||
|
|||
override def onExecutorMetricsUpdate(event: SparkListenerExecutorMetricsUpdate): Unit = { | |||
if (event.execId == SparkContext.DRIVER_IDENTIFIER) { | |||
logEvent(event) | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do this only when shouldLogStageExecutorMetrics
is enabled ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do this only when
shouldLogStageExecutorMetrics
is enabled ?
I don't thinks it should be controlled by shouldLogStageExecutorMetrics
. since driver's metrics is not related to stage executor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, we have a single event for both driver and executor metrics update - differentiated by exec id.
I dont have strong opinions on this, but if we have a flag (shouldLogStageExecutorMetrics
) controlling whether metrics are to be updated, we should consistently apply it IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, we have a single event for both driver and executor metrics update - differentiated by exec id.
I dont have strong opinions on this, but if we have a flag (shouldLogStageExecutorMetrics
) controlling whether metrics are to be updated, we should consistently apply it IMO.
@mridulm Follow this comment, how about current.
I know spark metrics frame work can have a monitor on this. But when we want to build an application analysis system like Dr.elephant. We want to get app status from restful api, right? Driver's memory usage is an important index too. |
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #136680 has finished for PR 31992 at commit
|
ping @mridulm Any more update? |
As I understood based on description and proposed changes, the right level of integration for this would be with metrics subsystem.. While we can do it via other means, it is not optimal to do so. |
Yea, also ping @srowen @Ngone51 @gengliangwang |
I don't know enough to have an opinion on this. I think the key questions are - what is the most consistent thing to do, and, are there any performance problems with adding this information to events? |
Kubernetes integration test starting |
Kubernetes integration test status failure |
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #137559 has finished for PR 31992 at commit
|
Test build #137583 has finished for PR 31992 at commit
|
@AngersZhuuuu BTW did you disable GA in your fork repo? It should be enabled so PR leverage the GA resources in your forked repo. |
cc @HeartSaVioR too FYI |
How about current |
No, but this pr is a little long. |
Test build #139843 has finished for PR 31992 at commit
|
Kubernetes integration test status success |
Kubernetes integration test starting |
Kubernetes integration test starting |
retest this please |
Kubernetes integration test status success |
Kubernetes integration test status success |
Test build #139837 has finished for PR 31992 at commit
|
Test build #139842 has finished for PR 31992 at commit
|
Kubernetes integration test starting |
Kubernetes integration test starting |
Test build #139850 has finished for PR 31992 at commit
|
Kubernetes integration test status success |
retest this please |
Kubernetes integration test status success |
Test build #139866 has finished for PR 31992 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status success |
Any more suggestion? |
Merging to master, thanks for working on this and pushing this through @AngersZhuuuu ! Thanks for the reviews @HyukjinKwon, @srowen ! |
What changes were proposed in this pull request?
In current EventLoggingListener, we won't write SparkListenerExecutorMetricsUpdate message to event log file at all
In history server's restful API about executor, we can get Executor's metrics but can't get all driver's metrics. Executor's executor metrics can be updated with TaskEnd event etc...
So in this pr, I add support to log SparkListenerExecutorMetricsUpdateEvent of
driver
whenspark.eventLog.logStageExecutorMetrics
is true.Why are the changes needed?
Make user can got driver's peakMemoryMetrics in SHS.
Does this PR introduce any user-facing change?
user can got driver's executor metrics in SHS's restful API.
How was this patch tested?
Mannul test