scala>val peopleRDD = sc.textFile("examples/src/main/resources/people.txt")
peopleRDD: org.apache.spark.rdd.RDD[String]= examples/src/main/resources/people.txt MapPartitionsRDD[1] at textFile at <console>:24
scala>caseclass Person(name:String, age:Long)
defined class Person
scala> peopleRDD.map(line =>{val para = line.split(",");Person(para(0),para(1).trim.toInt)}).toDS
res0: org.apache.spark.sql.Dataset[Person]=[name: string, age: bigint]