-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-46313][CORE] Log Spark HA recovery duration
#44243
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
Conversation
Spark HA recovery duration
| schedule() | ||
| logInfo("Recovery complete - resuming operations!") | ||
| val timeTakenNs = System.nanoTime() - recoveryStartTimeNs | ||
| logInfo(s"Recovery complete in ${timeTakenNs / 1000000000d}s - resuming operations!") |
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.
0.043445167s may be less readable for humans. How about rounding to milliseconds?
TimeUnit.NANOSECONDS.toMillis(timeTakenNs) ms or TimeUnit.NANOSECONDS.toMillis(timeTakenNs) / 1000.0 s
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.
Sure!
|
To @yaooqinn , I addressed your comments and updated the PR description example. |
yaooqinn
left a comment
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.
LGTM, thank you @dongjoon-hyun
|
Thank you, @yaooqinn ! Merged to master. |
### What changes were proposed in this pull request? This PR aims to log `Spark HA` recovery duration. ### Why are the changes needed? It will show the elapsed time like the following. ``` - 23/12/07 18:25:29 INFO Master: Recovery complete - resuming operations! - 23/12/07 18:25:29 INFO Master: Recovery complete in 60.020s - resuming operations! ``` ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs and manual review. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#44243 from dongjoon-hyun/SPARK-46313. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
### What changes were proposed in this pull request? This PR aims to log `Spark HA` recovery duration. ### Why are the changes needed? It will show the elapsed time like the following. ``` - 23/12/07 18:25:29 INFO Master: Recovery complete - resuming operations! - 23/12/07 18:25:29 INFO Master: Recovery complete in 60.020s - resuming operations! ``` ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs and manual review. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#44243 from dongjoon-hyun/SPARK-46313. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
What changes were proposed in this pull request?
This PR aims to log
Spark HArecovery duration.Why are the changes needed?
It will show the elapsed time like the following.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Pass the CIs and manual review.
Was this patch authored or co-authored using generative AI tooling?
No.