Skip to content
Snippets Groups Projects
Commit b534e2dd authored by skeirik2's avatar skeirik2
Browse files

added missing code to putBytes from LCS

parent e2297b3b
No related branches found
No related tags found
No related merge requests found
...@@ -159,6 +159,30 @@ private[spark] class MemoryStore( ...@@ -159,6 +159,30 @@ private[spark] class MemoryStore(
entries.synchronized { entries.synchronized {
entries.put(blockId, entry) entries.put(blockId, entry)
} }
// SS
val blockExInfos = blockManager.blockInfoManager.blockExInfos
val inMemExInfos = blockManager.blockInfoManager.inMemExInfos
if (blockId.isRDD) {
val curValue = blockExInfos.get(blockId)
curValue.size = size
curValue.writeFinAndCalCreatCost(System.currentTimeMillis())
// add to SortMap
inMemExInfos.synchronized {
logInfo("Phoenix: Add " + curValue.blockId + " to inMemBlockExInfo")
inMemExInfos.add(curValue)
}
logInfo("Create Block " + blockId + "and store in memory cost " + curValue.creatCost +
" and normCost is " + curValue.norCost)
// update son's start time in par's watching list
var sonSet = blockExInfos.get(blockId).sonSet
// sonSet.synchronized
for (sonId <- sonSet) {
blockExInfos.get(sonId).creatStartTime = System.currentTimeMillis()
logInfo("Phoenix: update start time of sonId " + sonId)
}
sonSet = Set()
}
// SS
logInfo("Block %s stored as bytes in memory (estimated size %s, free %s)".format( logInfo("Block %s stored as bytes in memory (estimated size %s, free %s)".format(
blockId, Utils.bytesToString(size), Utils.bytesToString(maxMemory - blocksMemoryUsed))) blockId, Utils.bytesToString(size), Utils.bytesToString(maxMemory - blocksMemoryUsed)))
true true
......
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