1. [SPARK-34125][CORE][2.4] Make EventLoggingListener.codecMap thread-safe (details)
Commit e0e1e21ee84bb3cb20eefee982da59afaa250a2c by kabhwan.opensource
[SPARK-34125][CORE][2.4] Make EventLoggingListener.codecMap thread-safe

### What changes were proposed in this pull request?
`EventLoggingListener.codecMap` change `mutable.HashMap` to `ConcurrentHashMap`

### Why are the changes needed?
2.x version of history server
`EventLoggingListener.codecMap` is of type mutable.HashMap, which is not thread safe.
This will cause the history server to suddenly get stuck and not work.
The 3.x version was changed to `EventLogFileReader.codecMap` to `ConcurrentHashMap` type, so there is no such problem.(SPARK-28869)

Multiple threads call `openEventLog`, `codecMap` is updated by multiple threads, `mutable.HashMap` may fall into an infinite loop during `resize`, resulting in history server not working.

PID 117049 0x1c939


### Does this PR introduce _any_ user-facing change?

### How was this patch tested?
exist ut

Closes #31194 from cxzl25/SPARK-34125.

Authored-by: sychen <>
Signed-off-by: Jungtaek Lim <>
The file was modifiedcore/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala (diff)