Skip to content

Commit

Permalink
[CORE]codeStyle: uniform ConcurrentHashMap define in StorageLevel.sca…
Browse files Browse the repository at this point in the history
…la with other places

Author: Zhang, Liye <[email protected]>

Closes apache#2793 from liyezhang556520/uniformHashMap and squashes the following commits:

5884735 [Zhang, Liye] [CORE]codeStyle: uniform ConcurrentHashMap define in StorageLevel.scala
  • Loading branch information
liyezhang556520 authored and JoshRosen committed Dec 11, 2014
1 parent 652b781 commit 57d37f9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 57d37f9

Please sign in to comment.