Flash Sale: Flat 70% + Addl. 25% Off on all Courses | Use Coupon DS25 in Checkout | Offer Expires In

  Enroll Now

What would the following code do?

var inputdata = List((1,2),(1,13),(1,4), (1, 6))
var kvrdd = sc.parallelize(inputdata)
def max(a:Int, b:Int): Int = {
    if(a > b) return a;
    return b
}
val out = kvrdd.reduceByKey(max)
out.collect()

Note - Having trouble with the assessment engine? Follow the steps listed here


No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...