scala> val lines = sc.parallelize(List(1, 2, 3))
lines: org.apache.spark.rdd.RDD[Int] = ParallelCollectionRDD at parallelize at :29
scala> val linelengths = lines.map(s => s.length)
:31: error: value length is not a member of Int
val linelengths = lines.map(s => s.length)
I am new to spark and scala.
Could anyone please help me understand what is this error all about.