Skip to content

Commit

Permalink
SPARK-3278 readability refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
zapletal-martin committed Jan 18, 2015
1 parent f90c8c7 commit ce0e30c
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,11 @@ class PoolAdjacentViolators private [mllib]
testData: RDD[(Double, Double, Double)],
isotonic: Boolean): Seq[(Double, Double, Double)] = {

poolAdjacentViolators(
testData
.sortBy(_._2)
.cache()
.mapPartitions(it => poolAdjacentViolators(it.toArray, isotonic).toIterator)
.collect(), isotonic)
val parallelStepResult = testData
.sortBy(_._2)
.mapPartitions(it => poolAdjacentViolators(it.toArray, isotonic).toIterator)

poolAdjacentViolators(parallelStepResult.collect(), isotonic)
}
}

Expand Down

0 comments on commit ce0e30c

Please sign in to comment.