Skip to content

Commit

Permalink
[SPARK-22465][Core][WIP] Fix Scala style checks
Browse files Browse the repository at this point in the history
  • Loading branch information
sujithjay committed Dec 20, 2017
1 parent 4b2dcac commit ca6aa08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/scala/org/apache/spark/Partitioner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ object Partitioner {
def defaultPartitioner(rdd: RDD[_], others: RDD[_]*): Partitioner = {
val rdds = (Seq(rdd) ++ others)
val hasPartitioner = rdds.filter(_.partitioner.exists(_.numPartitions > 0))
if (hasPartitioner.nonEmpty && isEligiblePartitioner(hasPartitioner.maxBy(_.partitions.length), rdds)) {
if (hasPartitioner.nonEmpty
&& isEligiblePartitioner(hasPartitioner.maxBy(_.partitions.length), rdds)) {
hasPartitioner.maxBy(_.partitions.length).partitioner.get
} else {
if (rdd.context.conf.contains("spark.default.parallelism")) {
Expand Down

0 comments on commit ca6aa08

Please sign in to comment.