spark学习-40-Spark的UnifiedMemoryManager

1。StaticMemoryManager继承与MemoryManager,它是静态的内存分配,是1.6版本以前的实现,就像是建筑商建造好了房子,用户来到直接住进去就好了(弊端:有的人多住了小房子,有的人少住了大房子)。而UnifiedMemoryManager是自由分配内存的实现,相当于组装房,你要多大我给你多大。

package org.apache.spark.memory

import org.apache.spark.SparkConf
import org.apache.spark.storage.BlockId

/**
 * A [[MemoryManager]] that enforces a soft boundary between execution and storage such that
 * either side can borrow memory from the other.
  *
  * 一个[[MemoryManager]],它强制执行和存储之间的软边界,这样任何一方都可以从另一方借用内存。
 *
 * The region shared between execution and storage is a fraction of (the total heap space - 300MB)
 * configurable through `spark.memory.fraction` (default 0.6). The position of the boundary
 * within this space is further determined by `spark.memory.storageFraction` (default 

你可能感兴趣的:(大数据-spark)