Enrollments started for Post Graduate Certificate Program in Applied Data Science & AI By IIT Roorkee | 5 Seats Left
Apply NowLogin using Social Account
     Continue with GoogleLogin using your credentials
What would the following code do?
var inputdata = List((1,2.0),(1,12.0),(1,4.0), (1, 6.0))
var kvrdd = sc.parallelize(inputdata)
def avg(a:Double, b:Double): Double = {
return (a+b)/2
}
val out = kvrdd.reduceByKey(avg)
out.collect()
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
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...