Interoperat
Interoperating with RDDs
Spark SQL supports two different methods for converting existing RDDs into Datasets. The firstmethod uses reflection to infer the schema of an RDD that contains specific types of objects. Thisreflection based approach leads to more concise code and works well when you already know the schemawhile writing your Spark application.
The second method for creating Datasets is through a programmatic interface that allows you toconstruct a schema and then apply it to an existing RDD. While this method is more verbose, it allowsyou to construct Datasets when the columns and their types are not known until runtime.
ing with RDDs 主要用第一种,步骤:创建case class,映射