From 689495d496984b485c4f53d86c98f6b8fbebdb61 Mon Sep 17 00:00:00 2001 From: witgo Date: Wed, 14 May 2014 14:32:15 +0800 Subject: [PATCH] fix scala style bug --- core/src/main/scala/org/apache/spark/Partitioner.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/scala/org/apache/spark/Partitioner.scala b/core/src/main/scala/org/apache/spark/Partitioner.scala index 62747960618a9..2251fbde1fd55 100644 --- a/core/src/main/scala/org/apache/spark/Partitioner.scala +++ b/core/src/main/scala/org/apache/spark/Partitioner.scala @@ -204,8 +204,9 @@ class BoundaryPartitioner[K : Ordering : ClassTag, V]( * 3 partitions, 500 keys / partition and if rdd has 700 keys, 1 partition will be entirely * empty. */ - if(counts(currPartition) >= keysPerPartition) + if(counts(currPartition) >= keysPerPartition) { currPartition = (currPartition + 1) % numPartitions + } partition }