Skip to content

Instantly share code, notes, and snippets.

@dgadiraju
Created September 10, 2019 14:54
Show Gist options
  • Save dgadiraju/0ee32a4b3732e14a23d638b4c08182cf to your computer and use it in GitHub Desktop.
Save dgadiraju/0ee32a4b3732e14a23d638b4c08182cf to your computer and use it in GitHub Desktop.
val rdd1 = sc.parallelize(List(1, 2, 3, 4, 5))
val rdd2 = sc.parallelize(List(2, 3, 4, 5, 6))
rdd1.cartesian(rdd2).take(10).foreach(println)
rdd1.cartesian(rdd2).count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment