Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.6.2
-
None
Description
Spark registers some shutdown hooks, and they log messages during shutdown:
Since the Logging trait creates SLF4J loggers lazily:
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/internal/Logging.scala#L47
a SLF4J logger is created during the execution of the shutdown hook.
This does not work when Log4j 2.x is used as SLF4J implementation:
https://issues.apache.org/jira/browse/LOG4J2-1222
Even though Log4j 2.6 handles this more gracefully than before, it still does emit a warning and will not be able to process the log message properly.
Proposed solution: make sure to eagerly create the SLF4J logger to be used in shutdown hooks when registering the hook.
Attachments
Issue Links
- relates to
-
SPARK-6305 Add support for log4j 2.x to Spark
- Resolved
- links to