Transforming RDDs with set operation APIs

In this recipe, we explore set operations on RDDs, such as intersection(), union(), subtract(), and distinct() and Cartesian(). Let's implement the usual set operations in a distributed manner.

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.