See also

While the RDD set operators are easy to use, one must be careful with the data shuffling that Spark has to perform in the background to complete some of these operations (for example, intersection).

It is worth nothing that the union operator does not remove duplicates from the resulting RDD set.

Get Apache Spark 2.x Machine Learning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.