Is there any performance impact when I use collectAsMap on my RDD instead of rdd.collect().toMap ?
I have a key value rdd and I want to convert to HashMap as far I
No difference. Avoid using collect() as much as you can as it destroys the concept of parallelism and collects the data on the driver.