[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:
Zhang, Liye 2014-12-10 20:44:59 -08:00 committed by Josh Rosen
parent 652b781a9b
commit 57d37f9c71

View file

@ -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)