scala> val lines = sc.parallelize(List(1, 2, 3))
lines: org.apache.spark.rdd.RDD[Int] = ParallelCollectionRDD[3] 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)
^
scala>
I am new to spark and scala.
Could anyone please help me understand what is this error all about.
Regards,
Pooja