Skip to content
Snippets Groups Projects
Commit ae6570ec authored by Reynold Xin's avatar Reynold Xin
Browse files

Remove TODO in ShuffleMemoryManager.

parent be0dcd6e
No related branches found
No related tags found
No related merge requests found
...@@ -177,7 +177,6 @@ private[spark] object ShuffleMemoryManager { ...@@ -177,7 +177,6 @@ private[spark] object ShuffleMemoryManager {
val cores = if (numCores > 0) numCores else Runtime.getRuntime.availableProcessors() val cores = if (numCores > 0) numCores else Runtime.getRuntime.availableProcessors()
// Because of rounding to next power of 2, we may have safetyFactor as 8 in worst case // Because of rounding to next power of 2, we may have safetyFactor as 8 in worst case
val safetyFactor = 16 val safetyFactor = 16
// TODO(davies): don't round to next power of 2
val size = ByteArrayMethods.nextPowerOf2(maxMemory / cores / safetyFactor) val size = ByteArrayMethods.nextPowerOf2(maxMemory / cores / safetyFactor)
val default = math.min(maxPageSize, math.max(minPageSize, size)) val default = math.min(maxPageSize, math.max(minPageSize, size))
conf.getSizeAsBytes("spark.buffer.pageSize", default) conf.getSizeAsBytes("spark.buffer.pageSize", default)
......
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