Skip to content

Commit 0cc05dd

Browse files
committed
add note for use synchronizedMap
1 parent 3c224d3 commit 0cc05dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sql/core/src/main/scala/org/apache/spark/sql/SQLConf.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ private[spark] object SQLConf {
5050
trait SQLConf {
5151
import SQLConf._
5252

53-
@transient protected[spark] val settings =
54-
new java.util.concurrent.ConcurrentHashMap[String, String]
53+
/** Only low degree of contention is expected for conf, thus NOT using ConcurrentHashMap. */
54+
@transient protected[spark] val settings = java.util.Collections.synchronizedMap(
55+
new java.util.HashMap[String, String]())
5556

5657
/** ************************ Spark SQL Params/Hints ******************* */
5758
// TODO: refactor so that these hints accessors don't pollute the name space of SQLContext?

0 commit comments

Comments
 (0)