[CORE]codeStyle: uniform ConcurrentHashMap define in StorageLevel.scala with other places
Author: Zhang, Liye <liye.zhang@intel.com> Closes #2793 from liyezhang556520/uniformHashMap and squashes the following commits: 5884735 [Zhang, Liye] [CORE]codeStyle: uniform ConcurrentHashMap define in StorageLevel.scala
This commit is contained in:
parent
652b781a9b
commit
57d37f9c71
|
@ -18,6 +18,7 @@
|
|||
package org.apache.spark.storage
|
||||
|
||||
import java.io.{Externalizable, IOException, ObjectInput, ObjectOutput}
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
import org.apache.spark.annotation.DeveloperApi
|
||||
import org.apache.spark.util.Utils
|
||||
|
@ -220,8 +221,7 @@ object StorageLevel {
|
|||
getCachedStorageLevel(obj)
|
||||
}
|
||||
|
||||
private[spark] val storageLevelCache =
|
||||
new java.util.concurrent.ConcurrentHashMap[StorageLevel, StorageLevel]()
|
||||
private[spark] val storageLevelCache = new ConcurrentHashMap[StorageLevel, StorageLevel]()
|
||||
|
||||
private[spark] def getCachedStorageLevel(level: StorageLevel): StorageLevel = {
|
||||
storageLevelCache.putIfAbsent(level, level)
|
||||
|
|
Loading…
Reference in a new issue