Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.

Commit 133dc48

Browse files
author
Meng, Peng
authored
Merge pull request #523 from mpjlu/fixALSRandom
ALS prepare data to support scala 2.10
2 parents dc77558 + 2bfa491 commit 133dc48

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

sparkbench/ml/src/main/scala/com/intel/sparkbench/ml/RatingDataGenerator.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ import org.apache.spark.mllib.random._
2727
import org.apache.spark.rdd.{PairRDDFunctions, RDD}
2828
import org.apache.spark.mllib.linalg.{Vectors, Vector}
2929

30-
import scala.util.Random
31-
3230
object RatingDataGenerator {
3331

3432
def main(args: Array[String]): Unit = {
@@ -64,7 +62,7 @@ object RatingDataGenerator {
6462
}
6563

6664
val rawData: RDD[Vector] = RandomRDDs.normalVectorRDD(sc, numUsers, numProducts, numPartitions)
67-
val rng = new Random()
65+
val rng = new java.util.Random()
6866
val data = rawData.map{v =>
6967
val a = Array.fill[Double](v.size)(0.0)
7068
v.foreachActive{(i,vi) =>

0 commit comments

Comments
 (0)