Skip to content
Snippets Groups Projects
Commit 49fd053d authored by Justin Loew's avatar Justin Loew
Browse files

Test adding our intermediate block identifier data type

parent cdcccd7b
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,7 @@ import java.util.LinkedHashMap ...@@ -23,6 +23,7 @@ import java.util.LinkedHashMap
import scala.collection.mutable import scala.collection.mutable
import scala.collection.mutable.ArrayBuffer import scala.collection.mutable.ArrayBuffer
import scala.collection.mutable.SortedMap
import scala.reflect.ClassTag import scala.reflect.ClassTag
import com.google.common.io.ByteStreams import com.google.common.io.ByteStreams
...@@ -88,6 +89,12 @@ private[spark] class MemoryStore( ...@@ -88,6 +89,12 @@ private[spark] class MemoryStore(
// Note: all changes to memory allocations, notably putting blocks, evicting blocks, and // Note: all changes to memory allocations, notably putting blocks, evicting blocks, and
// acquiring or releasing unroll memory, must be synchronized on `memoryManager`! // acquiring or releasing unroll memory, must be synchronized on `memoryManager`!
private class OurBlockIdAndSizeType(
blockId: BlockId,
size: Long) extends Ordering[OurBlockIdAndSizeType] {
def compare(other: OurBlockIdAndSizeType): Int = this.size compare other.size
}
private val entries = new LinkedHashMap[BlockId, MemoryEntry[_]](32, 0.75f, true) private val entries = new LinkedHashMap[BlockId, MemoryEntry[_]](32, 0.75f, true)
// A mapping from taskAttemptId to amount of memory used for unrolling a block (in bytes) // A mapping from taskAttemptId to amount of memory used for unrolling a block (in bytes)
......
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