Ngone51 commented on code in PR #53540:
URL: https://github.com/apache/spark/pull/53540#discussion_r2660285093
##########
core/src/main/scala/org/apache/spark/util/ShutdownHookManager.scala:
##########
@@ -145,7 +145,11 @@ private[spark] object ShutdownHookManager extends Logging {
* @return A handle that can be used to unregister the shutdown hook.
*/
def addShutdownHook(hook: () => Unit): AnyRef = {
- addShutdownHook(DEFAULT_SHUTDOWN_PRIORITY)(hook)
+ addShutdownHook(DEFAULT_SHUTDOWN_PRIORITY,
hook.getClass.getSimpleName)(hook)
Review Comment:
I expect `hook.getClass.getSimpleName` would return anonymous function name.
Why not just remove this method but use `addShutdownHook(name: String)(hook: ()
=> Unit)` only?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]