Select the number of stages that will be generated from the DAG while executing the below code?

val rdd1 = sc.textFile("Customer")

val rdd2 = rdd1.map(_.split(",")).map(arr1 => (arr1(2),arr1(4).toInt))

rdd2.cache()

val rdd3 = rdd2.reduceByKey(_ max _)

rdd3.saveAsTextFile("output1")

1

2

3

4

Verified Answer
Correct Option - b

To get all Infosys Certified Spark Professional Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram