Error:(15, 103) value toDF is not a member of org.apache.spark.rdd.RDD[Employee] .map(attributes => Employee(attributes(0).trim.toInt, attributes(1), attributes(2).trim.toInt)).toDF()
scala编写spark的一个错误
解决方法:
将
case class Employee(id:Long,name:String,age:Long)
放到main函数外面
https://necydcy.me/