Github user nishkamravi2 commented on the pull request:
https://github.com/apache/spark/pull/4690#issuecomment-75198175
Utils.safeRemoveShutdownHook sounds ok, albeit a bit pretentious :) since a
try-catch block alone doesn't quite justify creation of a utility function
(unless we have a dozen or more occurrences). I would be perfectly fine with
just adding a try-catch block around the other occurrence. The null-pointer
check seems unnecessary (and incurs cost), so will delete it.
Also, it seems like inShutDown function is expensive. And should be used
only when necessary. I would vote for deleting all its occurrences except for
the one in SparkUncaughtExceptionHandler. Unless someone feels strongly
otherwise, I can do that cleanup as part of this fix.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]