Package

org.apache.spark

memory

Permalink

package memory

This package implements Spark's memory management system. This system consists of two main components, a JVM-wide memory manager and a per-task manager:

Internally, each of these components have additional abstractions for memory bookkeeping:

Diagrammatically:

+-------------+
| MemConsumer |----+                                   +------------------------+
+-------------+    |    +-------------------+          |     MemoryManager      |
                   +--->| TaskMemoryManager |----+     |                        |
+-------------+    |    +-------------------+    |     |  +------------------+  |
| MemConsumer |----+                             |     |  |  StorageMemPool  |  |
+-------------+         +-------------------+    |     |  +------------------+  |
                        | TaskMemoryManager |----+     |                        |
                        +-------------------+    |     |  +------------------+  |
                                                 +---->|  |OnHeapExecMemPool |  |
                                 *               |     |  +------------------+  |
                                 *               |     |                        |
+-------------+                  *               |     |  +------------------+  |
| MemConsumer |----+                             |     |  |OffHeapExecMemPool|  |
+-------------+    |    +-------------------+    |     |  +------------------+  |
                   +--->| TaskMemoryManager |----+     |                        |
                        +-------------------+          +------------------------+

There are two implementations of org.apache.spark.memory.MemoryManager which vary in how they handle the sizing of their memory pools:

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. memory
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class DefaultMemoryConsumer extends MemoryConsumer

    Permalink
  2. class DefaultMemoryManager extends StoreUnifiedManager with Logging

    Permalink
  3. final class ExecutionFreeMemory extends FreeMemory

    Permalink
  4. abstract class MemoryConsumer extends AnyRef

    Permalink
  5. abstract class MemoryEventListener extends AnyRef

    Permalink
  6. class MemoryManagerStatsWrapper extends MemoryManagerStatsOps

    Permalink

    A wrapper class for Split mode.

    A wrapper class for Split mode. In case of split mode UMM stats update will be a no-op

  7. final class MemoryMode extends Enum[MemoryMode]

    Permalink
  8. case class MemoryOwner(owner: String, offHeap: Boolean) extends Product with Serializable

    Permalink
  9. class SnappyStorageEvictor extends Logging

    Permalink
  10. class SnappyUnifiedMemoryManager extends UnifiedMemoryManager with StoreUnifiedManager with StoreCallback

    Permalink

    When there is request for execution or storage memory, critical up and eviction up events are checked.

    When there is request for execution or storage memory, critical up and eviction up events are checked. If they are set, try to free the memory cached by Spark rdds by calling memoryStore.evictBlocksToFreeSpace. If enough memory cannot be freed, return the call and let Spark take a corrective action. In such cases Spark either fails the task or move the current RDDs data to disk. If the critical and eviction events are not set, it asks the UnifiedMemoryManager to allocate the space.

  11. trait StoreUnifiedManager extends AnyRef

    Permalink

    Base trait for different memory manager used by SnappyData in different modes

  12. class TaskMemoryManager extends AnyRef

    Permalink
  13. class TooLargePageException extends RuntimeException

    Permalink

Value Members

  1. object MemoryManagerCallback extends Logging

    Permalink
  2. object SnappyMemoryUtils

    Permalink
  3. object SnappyStorageEvictor

    Permalink
  4. object SnappyUnifiedMemoryManager extends Logging with Serializable

    Permalink
  5. object UnifiedMemoryManager

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped