Created
June 18, 2016 09:52
-
-
Save khajavi/25767f82209dab0743f248cc44666354 to your computer and use it in GitHub Desktop.
Base Model Apache Spark
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait BaseTrait extends Product with Serializable | |
case class AT(name: String) extends BaseTrait | |
case class BT(age: Int) extends BaseTrait | |
val listA = AT("a1") :: AT("a2") :: Nil | |
val listB = BT(1) :: BT(2) :: Nil | |
val list = listA ++ listB | |
val res = sc.parallelize(list.toSeq).toDS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment