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
Please login to comment
5 Comments
var myrdd = Array(1,2,3,4)
Upvote ShareThis command has created rdd in scala ,so how is this the correct option?
Hi, Vaibhav.
var myrdd = Array(1,2,3,4)
Will create just an array in scala donn't get confused with the name myrdd. To create an rdd you need to a SparkContext- "sc" object to make it an rdd.
All the best!
-- Satyajit Das
Upvote ShareThank you sir, now i get that !
Upvote Sharecan you explain why this line is the answer?
Upvote Sharevar myrdd = Array(1,2,3,4)
I am able to run it and can run command myrdd.take(2)
Hi David Lee,
We have "take" method in Array collection also, so myrdd.take(2) will return first two elements in the array. It is not related to RDD
Upvote Share