Hey,
It already has SparkContent.union and it does know how to compute a union of multiple RDD's. You can use this below lines:
val rdds = List.tabulate(limit + 1)(x => sc.parallelize(x to x + 3))
val rdd = sc.union(rdds)
Otherwise, you can see one more way to do this:
val rdds = List.tabulate(limit + 1)(x => sc.parallelize(x to x + 3))
val rdd = balancedReduce(rdds)(_ union _)