Skip to content
Snippets Groups Projects
Commit ea096f7c authored by Matei Zaharia's avatar Matei Zaharia
Browse files

More logging

parent 554b42cb
No related branches found
No related tags found
No related merge requests found
...@@ -411,8 +411,10 @@ class BlockManager(val master: BlockManagerMaster, val serializer: Serializer, m ...@@ -411,8 +411,10 @@ class BlockManager(val master: BlockManagerMaster, val serializer: Serializer, m
var bytesInFlight = 0L var bytesInFlight = 0L
def sendRequest(req: FetchRequest) { def sendRequest(req: FetchRequest) {
logDebug("Sending request for %d blocks (%s) from %s".format(
req.blocks.size, Utils.memoryBytesToString(req.size), req.address.ip))
val cmId = new ConnectionManagerId(req.address.ip, req.address.port) val cmId = new ConnectionManagerId(req.address.ip, req.address.port)
val blockMessageArray = new BlockMessageArray(req.blocks.map{ val blockMessageArray = new BlockMessageArray(req.blocks.map {
case (blockId, size) => BlockMessage.fromGetBlock(GetBlock(blockId)) case (blockId, size) => BlockMessage.fromGetBlock(GetBlock(blockId))
}) })
bytesInFlight += req.size bytesInFlight += req.size
...@@ -450,10 +452,11 @@ class BlockManager(val master: BlockManagerMaster, val serializer: Serializer, m ...@@ -450,10 +452,11 @@ class BlockManager(val master: BlockManagerMaster, val serializer: Serializer, m
localBlockIds ++= blockInfos.map(_._1) localBlockIds ++= blockInfos.map(_._1)
} else { } else {
remoteBlockIds ++= blockInfos.map(_._1) remoteBlockIds ++= blockInfos.map(_._1)
// Make our requests at least maxBytesInFlight / 4 in length; the reason to keep them // Make our requests at least maxBytesInFlight / 5 in length; the reason to keep them
// smaller than maxBytesInFlight is to allow multiple, parallel fetches from up to 4 // smaller than maxBytesInFlight is to allow multiple, parallel fetches from up to 5
// nodes, rather than blocking on reading output from one node. // nodes, rather than blocking on reading output from one node.
val minRequestSize = math.max(maxBytesInFlight / 4, 1L) val minRequestSize = math.max(maxBytesInFlight / 5, 1L)
logInfo("maxBytesInFlight: " + maxBytesInFlight + ", minRequest: " + minRequestSize)
val iterator = blockInfos.iterator val iterator = blockInfos.iterator
var curRequestSize = 0L var curRequestSize = 0L
var curBlocks = new ArrayBuffer[(String, Long)] var curBlocks = new ArrayBuffer[(String, Long)]
......
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