Vaka sınıfı nesnelerin bir RDD oluşturmaya çalışıyorum. .kıvılcım hatası RDD oluştururken RDD türü bulunamadı
<console>:28: error: not found: type RDD
val people: RDD[Person] =sc.textFile("/user/root/people.txt").map(_.split(",")).map(p => Person(p(0), p(1).trim.toInt))
neyin yanlış gittiğini üzerinde herhangi bir fikir: Ör
// sqlContext from the previous example is used in this example.
// createSchemaRDD is used to implicitly convert an RDD to a SchemaRDD.
import sqlContext.createSchemaRDD
val people: RDD[Person] = ... // An RDD of case class objects, from the previous example.
// The RDD is implicitly converted to a SchemaRDD by createSchemaRDD, allowing it to be stored using Parquet.
people.saveAsParquetFile("people.parquet")
Ben
case class Person(name: String, age: Int)
// Create an RDD of Person objects and register it as a table.
val people: RDD[Person] = sc.textFile("/user/root/people.txt").map(_.split(",")).map(p => Person(p(0), p(1).trim.toInt))
people.registerAsTable("people")
aşağıdaki hatayı alıyorum vererek önceki örnekten kısmını tamamlamaya çalışıyorum? Şimdiden teşekkürler!
Bir ton teşekkürler, Josh. – user1189851