Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Explain the various Transformation on Apache Spark RDD like distinct(), union(), intersection(), and subtract()?

Answer Posted / Padmabahadur Yadav

The following are the explanations of various transformations on Apache Spark's RDD:

1. distinct(): It is used to remove duplicate elements from an RDD. The resulting RDD will contain only unique elements.
2. union(): It combines all the given RDDs into a single RDD containing all elements from each input RDD. The order of elements in the output RDD may not be the same as any of the input RDDs.
3. intersection(): It returns an RDD that contains only the common elements present in both the given RDDs. If there are no common elements, it will return an empty RDD.
4. subtract(): It returns a RDD containing all elements from the first RDD that do not exist in the second RDD.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List the advantage of Parquet file in Apache Spark?

474


What is meant by Transformation? Give some examples.

328


Explain how RDDs work with Scala in Spark

355


What is the latest version of spark?

288