Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sunchao committed Feb 7, 2024
1 parent b38a321 commit 23c66af
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/src/main/scala/org/apache/spark/storage/BlockManager.scala
Original file line number Diff line number Diff line change
Expand Up @@ -229,17 +229,19 @@ private[spark] class BlockManager(
ThreadUtils.newDaemonCachedThreadPool("block-manager-future", 128))

// Actual storage of where blocks are kept
private[spark] val memoryStore =
new MemoryStore(conf, blockInfoManager, serializerManager, memoryManager, this)
private[spark] lazy val memoryStore = {
val store = new MemoryStore(conf, blockInfoManager, serializerManager, memoryManager, this)
memoryManager.setMemoryStore(store)
store
}
private[spark] val diskStore = new DiskStore(conf, diskBlockManager, securityManager)
memoryManager.setMemoryStore(memoryStore)

// Note: depending on the memory manager, `maxMemory` may actually vary over time.
// However, since we use this only for reporting and logging, what we actually want here is
// the absolute maximum value that `maxMemory` can ever possibly reach. We may need
// to revisit whether reporting this value as the "max" is intuitive to the user.
private val maxOnHeapMemory = memoryManager.maxOnHeapStorageMemory
private val maxOffHeapMemory = memoryManager.maxOffHeapStorageMemory
private lazy val maxOnHeapMemory = memoryManager.maxOnHeapStorageMemory
private lazy val maxOffHeapMemory = memoryManager.maxOffHeapStorageMemory

private[spark] val externalShuffleServicePort = StorageUtils.externalShuffleServicePort(conf)

Expand Down

0 comments on commit 23c66af

Please sign in to comment.