From f45848936d7df34d02162ed589da0d085112cb48 Mon Sep 17 00:00:00 2001 From: Matt Massie Date: Thu, 11 Jun 2015 09:59:47 -0700 Subject: [PATCH] Remove unnecessary map() on return Iterator --- .../org/apache/spark/shuffle/hash/HashShuffleReader.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/main/scala/org/apache/spark/shuffle/hash/HashShuffleReader.scala b/core/src/main/scala/org/apache/spark/shuffle/hash/HashShuffleReader.scala index 9a60d94af0cc5..23bae9223bb7c 100644 --- a/core/src/main/scala/org/apache/spark/shuffle/hash/HashShuffleReader.scala +++ b/core/src/main/scala/org/apache/spark/shuffle/hash/HashShuffleReader.scala @@ -80,9 +80,7 @@ private[spark] class HashShuffleReader[K, C]( } } else { require(!dep.mapSideCombine, "Map-side combine without Aggregator specified!") - - // Convert the Product2s to pairs since this is what downstream RDDs currently expect - interruptibleIter.asInstanceOf[Iterator[Product2[K, C]]].map(pair => (pair._1, pair._2)) + interruptibleIter.asInstanceOf[Iterator[Product2[K, C]]] } // Sort the output if there is a sort ordering defined.