[native pos] Propagate taskInfo updates to Spark metrics#20295
Merged
shrinidhijoshi merged 1 commit intoprestodb:masterfrom Jul 12, 2023
Merged
[native pos] Propagate taskInfo updates to Spark metrics#20295shrinidhijoshi merged 1 commit intoprestodb:masterfrom
shrinidhijoshi merged 1 commit intoprestodb:masterfrom
Conversation
Currently, we update the spark metrics accumulators only after the task is complete. This means that spark sees no progress or activity on the task until the task is complete. This also means that we can't effectively use the stalled tasks killer in spark scheduler as it relies on spark accumulators being updated regularly to measure if a task is making progress. This commit fixes this by ensuring that everytime we receive TaskInfo from CPP process we immediately update Spark accumulators to let spark know that we are making progress
Contributor
|
LGTM, but do you know which event trigger the check on Spark Side? |
Contributor
|
As offline discussion, this probably won't work (not enough) as IIUC, Presto-on-spark in general only pass back the taskInfo to driver/coordinator when task finished. |
Collaborator
Author
@AdeleoM Spark's scheduler runs a loop to watch the task metrics. So we don't need a trigger. |
Collaborator
Author
Clarified with @miaoever that we are updating the spark's |
shrinidhijoshi
added a commit
to shrinidhijoshi/presto
that referenced
this pull request
Jul 28, 2023
Reverting (prestodb#20295) until we figure out why metrics aren't updating. Current investigation shows that TaskContext object, which is needed during metrics update, is not available in the HttpNativeExecutionTaskInfoFetcher thread. So reverting to doing the task metrics update in the PrestoNativeTaskExecutorFactory until we investigate and come with a fix.
shrinidhijoshi
added a commit
that referenced
this pull request
Jul 29, 2023
Reverting (#20295) until we figure out why metrics aren't updating. Current investigation shows that TaskContext object, which is needed during metrics update, is not available in the HttpNativeExecutionTaskInfoFetcher thread. So reverting to doing the task metrics update in the PrestoNativeTaskExecutorFactory until we investigate and come with a fix.
SeanIFitch
pushed a commit
to SeanIFitch/presto
that referenced
this pull request
Aug 2, 2023
Reverting (prestodb#20295) until we figure out why metrics aren't updating. Current investigation shows that TaskContext object, which is needed during metrics update, is not available in the HttpNativeExecutionTaskInfoFetcher thread. So reverting to doing the task metrics update in the PrestoNativeTaskExecutorFactory until we investigate and come with a fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, we update the spark metrics accumulators only after the task is complete. This means that spark sees no progress or activity on the task until the task is complete. This also means that we can't effectively use the stalled tasks killer in spark scheduler as it relies on spark accumulators being updated regularly to measure if a task is making progress.
This commit fixes this by ensuring that everytime we receive TaskInfo from CPP process we immediately update Spark accumulators to let spark know that we are making progress