Permalink
Browse files

Removing more un-needed array-buffer to iterator conversions

  • Loading branch information...
1 parent 627a8b7 commit c2fb43056c836ebb520bd076da2b576c32e794cf @kellrott kellrott committed Feb 26, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/src/main/scala/org/apache/spark/storage/BlockManager.scala
@@ -360,7 +360,7 @@ private[spark] class BlockManager(
// TODO: Consider creating a putValues that also takes in a iterator?
val valuesBuffer = new ArrayBuffer[Any]
valuesBuffer ++= values
- memoryStore.putValues(blockId, valuesBuffer.toIterator, level, true).data match {
+ memoryStore.putValues(blockId, valuesBuffer, level, true).data match {
case Left(values2) =>
return Some(values2)
case _ =>
@@ -703,7 +703,7 @@ private[spark] class BlockManager(
logInfo("Writing block " + blockId + " to disk")
data match {
case Left(elements) =>
- diskStore.putValues(blockId, elements.toIterator, level, false)
+ diskStore.putValues(blockId, elements, level, false)
case Right(bytes) =>
diskStore.putBytes(blockId, bytes, level)
}

0 comments on commit c2fb430

Please sign in to comment.