Skip to content

Commit

Permalink
[SPARK-12187] *MemoryPool classes should not be fully public
Browse files Browse the repository at this point in the history
This patch tightens them to `private[memory]`.

Author: Andrew Or <[email protected]>

Closes apache#10182 from andrewor14/memory-visibility.
  • Loading branch information
Andrew Or authored and JoshRosen committed Dec 8, 2015
1 parent 2ff17bc commit 9494521
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9494521

Please sign in to comment.