diff options
author | Imran Rashid <imran@quantifind.com> | 2013-02-05 14:31:46 -0800 |
---|---|---|
committer | Imran Rashid <imran@quantifind.com> | 2013-02-05 14:31:46 -0800 |
commit | cfab1a35282c08cec351e468f6e57d1261f02d10 (patch) | |
tree | 7f5f7fa0b7df6706e9a7f1e813bb76fb73b6f107 | |
parent | f6ec547ea7b56ee607a4c2a69206f8952318eaf1 (diff) | |
download | spark-cfab1a35282c08cec351e468f6e57d1261f02d10.tar.gz spark-cfab1a35282c08cec351e468f6e57d1261f02d10.tar.bz2 spark-cfab1a35282c08cec351e468f6e57d1261f02d10.zip |
add as many fetch requests as we can, subject to maxBytesInFlight
-rw-r--r-- | core/src/main/scala/spark/storage/BlockManager.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/spark/storage/BlockManager.scala b/core/src/main/scala/spark/storage/BlockManager.scala index 9893e9625d..2e7db60841 100644 --- a/core/src/main/scala/spark/storage/BlockManager.scala +++ b/core/src/main/scala/spark/storage/BlockManager.scala @@ -585,7 +585,7 @@ class BlockManager( resultsGotten += 1 val result = results.take() bytesInFlight -= result.size - if (!fetchRequests.isEmpty && + while (!fetchRequests.isEmpty && (bytesInFlight == 0 || bytesInFlight + fetchRequests.front.size <= maxBytesInFlight)) { sendRequest(fetchRequests.dequeue()) } |