map: Applies a function to each element.filter: Filters elements based on a condition.flatMap: Applies a function that returns multiple elements for each input element.join: Joins two RDDs based on a key.groupBy: Groups elements based on a key.sortByKey: Sorts an RDD by key.union: Combines two RDDs.intersection: Finds the common elements between two RDDs.collect: Returns all elements of the RDD to the driver (use cautiously for large datasets).count: Returns the number of elements in the RDD.take(n): Returns the first n elements of the RDD.first: Returns the first element of the RDD.reduce: Applies a function cumulatively to the elements of the RDD.saveAsTextFile: Saves the RDD to a file.Q: What is an RDD in Spark?
Q: How is an RDD different from a DataFrame?
Q: When should I use RDDs instead of DataFrames?
Q: Are RDDs mutable?
Q: What are the key operations on RDDs?
map, filter, flatMap, join, union.collect, count, reduce, take.Q: What are narrow and wide dependencies in RDDs?
map, filter.groupByKey, reduceByKey.Q: Are RDDs fault-tolerant?
Q: What are some common use cases of RDDs?
Q: Can I convert between RDDs and DataFrames?
toDF() or spark.createDataFrame():
.rdd property: