-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add safeguards to prevent older attempts from generating metrics output in Scala Tool #1324
Merged
Conversation
This file contains 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
parthosa
added
bug
Something isn't working
core_tools
Scope the core module (scala)
labels
Aug 30, 2024
parthosa
force-pushed
the
spark-rapids-tools-1319
branch
from
August 30, 2024 16:50
b6878bc
to
c4954b5
Compare
amahussein
reviewed
Aug 30, 2024
core/src/main/scala/org/apache/spark/sql/rapids/tool/AppBase.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/nvidia/spark/rapids/tool/qualification/Qualification.scala
Show resolved
Hide resolved
core/src/main/scala/org/apache/spark/sql/rapids/tool/AppBase.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/org/apache/spark/sql/rapids/tool/AppBase.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/nvidia/spark/rapids/tool/profiling/ProfileOutputWriter.scala
Outdated
Show resolved
Hide resolved
core/src/main/scala/com/nvidia/spark/rapids/tool/profiling/Profiler.scala
Outdated
Show resolved
Hide resolved
parthosa
force-pushed
the
spark-rapids-tools-1319
branch
from
August 30, 2024 22:18
c4954b5
to
40abf94
Compare
… output Signed-off-by: Partho Sarthi <[email protected]>
parthosa
force-pushed
the
spark-rapids-tools-1319
branch
from
August 30, 2024 22:31
40abf94
to
90d18dd
Compare
* Adding synchronization on the reporting and autotuner level Signed-off-by: Ahmed Hussein (amahussein) <[email protected]> * Fix failing scala unit tests by providing unique app IDs in test (#53) * Fix UTs Signed-off-by: Partho Sarthi <[email protected]> * Ignore test for event logs with same app Id and attempt Id Signed-off-by: Partho Sarthi <[email protected]> --------- Signed-off-by: Partho Sarthi <[email protected]> --------- Signed-off-by: Ahmed Hussein (amahussein) <[email protected]> Signed-off-by: Partho Sarthi <[email protected]> Co-authored-by: Ahmed Hussein (amahussein) <[email protected]>
core/src/test/scala/com/nvidia/spark/rapids/tool/qualification/QualificationSuite.scala
Show resolved
Hide resolved
cindyyuanjiang
approved these changes
Sep 4, 2024
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.
Thanks! @parthosa @amahussein
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.
Fixes #1319. This PR adds safeguards to ensure that when users provide event logs for multiple attempts of the same app, only the newest attempt will generate metrics output.
Approach:
allApps
from Concurrent Linked Queue to Concurrent Hash Map ofApp ID -> QualificationSummaryInfo
AppSubscriber
class to manage application attempt IDs and thread-safe updates.withSafeValidAttempt()
: Accepts a function parameter f, which is executed if the current attempt ID is valid (i.e., greater than the existing one).Tests