Getting eroor in scala code

apache-spark
scala

#1


val ratings = sc.textFile("/user/shreshthasharma2392/ratings.csv")
case class ratings(userId:Integer,movieId:Integer,rating:Integer,time:String)

val rating_rdd = ratings.map(line => line.split(",")).map(p => (p(0).toInt,p(1).toInt,p(2).toInt,p(3)))

getting error after this command

val mapped_ratings = rating_rdd.map{
case (userid,movieid,rating,timestamp) => (movieid, 1)
}.reduceByKey(+).collect().sortBy(_._2).take(10);