cloud-fan commented on a change in pull request #26624:
URL: https://github.com/apache/spark/pull/26624#discussion_r420630835
##########
File path: core/src/main/scala/org/apache/spark/util/ThreadUtils.scala
##########
@@ -157,23 +259,23 @@ private[spark] object ThreadUtils {
*/
def newDaemonFixedThreadPool(nThreads: Int, prefix: String):
ThreadPoolExecutor = {
val threadFactory = namedThreadFactory(prefix)
- Executors.newFixedThreadPool(nThreads,
threadFactory).asInstanceOf[ThreadPoolExecutor]
+ MDCAwareThreadPoolExecutor.newFixedThreadPool(nThreads, threadFactory)
Review comment:
I only find one executor use case: `ContinuousCoalesceRDD`, which is for
continuous streaming. But the runnable submitted to the thread pool does not
have logging.
I checked some other methods in `ThreadUtils` but couldn't find executor
usages that need logging.
What's your target use case? Usually a Spark task takes one CPU core, so
it's very rare to use a thread pool within a Spark task,
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]