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函数外面

 

 
posted @ 2019-03-26 20:20  喜欢沧月的二福君  阅读(432)  评论(0编辑  收藏  举报

联系博主qq2456891380