Skip to content
Snippets Groups Projects
Commit 94945216 authored by Andrew Or's avatar Andrew Or Committed by Josh Rosen
Browse files

[SPARK-12187] *MemoryPool classes should not be fully public

This patch tightens them to `private[memory]`.

Author: Andrew Or <andrew@databricks.com>

Closes #10182 from andrewor14/memory-visibility.
parent 2ff17bcf
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ import org.apache.spark.Logging
* @param lock a [[MemoryManager]] instance to synchronize on
* @param poolName a human-readable name for this pool, for use in log messages
*/
class ExecutionMemoryPool(
private[memory] class ExecutionMemoryPool(
lock: Object,
poolName: String
) extends MemoryPool(lock) with Logging {
......
......@@ -27,7 +27,7 @@ import javax.annotation.concurrent.GuardedBy
* to `Object` to avoid programming errors, since this object should only be used for
* synchronization purposes.
*/
abstract class MemoryPool(lock: Object) {
private[memory] abstract class MemoryPool(lock: Object) {
@GuardedBy("lock")
private[this] var _poolSize: Long = 0
......
......@@ -31,7 +31,7 @@ import org.apache.spark.storage.{MemoryStore, BlockStatus, BlockId}
*
* @param lock a [[MemoryManager]] instance to synchronize on
*/
class StorageMemoryPool(lock: Object) extends MemoryPool(lock) with Logging {
private[memory] class StorageMemoryPool(lock: Object) extends MemoryPool(lock) with Logging {
@GuardedBy("lock")
private[this] var _memoryUsed: Long = 0L
......
......@@ -49,7 +49,7 @@ import org.apache.spark.storage.{BlockStatus, BlockId}
private[spark] class UnifiedMemoryManager private[memory] (
conf: SparkConf,
val maxMemory: Long,
private val storageRegionSize: Long,
storageRegionSize: Long,
numCores: Int)
extends MemoryManager(
conf,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment