Github user aarondav commented on a diff in the pull request: https://github.com/apache/spark/pull/1272#discussion_r14407762 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLConf.scala --- @@ -50,8 +50,7 @@ trait SQLConf { /** ********************** SQLConf functionality methods ************ */ @transient - private val settings = java.util.Collections.synchronizedMap( - new java.util.HashMap[String, String]()) + private val settings = new java.util.concurrent.ConcurrentHashMap[String, String]() --- End diff -- @rxin I think the performance distinction is extremely minor in this case, as there is only one ConcurrentHashMap. ConcurrentHashMap's API tends to be nicer to use, though, as people may not realize that iteration over a SynchronizedMap is not threadsafe, like in the current implementation of SQLConf. As @baishuo mentioned, if we use synchronizedMap we'll have to add settings.synchronized {} in a few places now.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---