Skip to content

Commit

Permalink
Merge pull request #230 from renaissance-benchmarks/ff/check-style-fix
Browse files Browse the repository at this point in the history
Checkstyle fix
  • Loading branch information
farquet authored Apr 14, 2020
2 parents 6013341 + 10dc098 commit 393adff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ final class LogRegression extends Benchmark with SparkUtil {
features(index) = value
}
(parts(0).toDouble, Vectors.dense(features))
}.cache()
}
.cache()
}

override def setUpBeforeAll(c: BenchmarkContext): Unit = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ final class MovieLens extends Benchmark with SparkUtil {
val fields = line.split(",")
// Format: (timestamp % 10, Rating(userId, movieId, rating))
(fields(3).toLong % 10, Rating(fields(0).toInt, fields(1).toInt, fields(2).toDouble))
}.cache()
}
.cache()

numRatings = ratings.count()
numUsers = ratings.map(_._2.user).distinct().count()
Expand All @@ -171,18 +172,21 @@ final class MovieLens extends Benchmark with SparkUtil {
.filter(x => x._1 < trainingThreshold)
.values
.union(personalRatingsRDD)
.repartition(numPartitions).cache()
.repartition(numPartitions)
.cache()
numTraining = training.count()

validation = ratings
.filter(x => x._1 >= trainingThreshold && x._1 < validationThreshold)
.values
.repartition(numPartitions).cache()
.repartition(numPartitions)
.cache()
numValidation = validation.count()

test = ratings
.filter(x => x._1 >= validationThreshold)
.values.cache()
.values
.cache()
numTest = test.count()

println(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import org.apache.spark.SparkConf
import org.apache.spark.SparkContext
import org.apache.spark.rdd.RDD


trait SparkUtil {

val portAllocationMaxRetries: Int = 16
Expand Down

0 comments on commit 393adff

Please sign in to comment.