> val orders = sc.textFile("file:///Users/jzhang/Downloads/SampleData.csv")
> .map{line=>line.split(",")}
The above code won't compile successfully, raise error
> orders: org.apache.spark.rdd.RDD[String] = MapPartitionsRDD[51] at
textFile at> <console>:39 > <console>:1: error: illegal start of definition
.map{line=>line.split(",")}
I only have to write it as following to make it pass the compilation.
> val orders =
sc.textFile("file:///Users/jzhang/Downloads/SampleData.csv").map{
> line=>line.split(",")}
I am not sure why. Is it intended or difficult to make it compatible with
scala syntax ?
BTW, I am using zeppelin 0.5
--
Best Regards
Jeff Zhang