Github user yhuai commented on a diff in the pull request: https://github.com/apache/spark/pull/8512#discussion_r39574274 --- Diff: core/src/main/scala/org/apache/spark/rdd/UnionRDD.scala --- @@ -62,6 +64,14 @@ class UnionRDD[T: ClassTag]( var rdds: Seq[RDD[T]]) extends RDD[T](sc, Nil) { // Nil since we implement getDependencies + // TODO(davies): configurable + if (rdds.length > 10) { + // prepare the partitions in parallel (will be cached) + val parArray = rdds.toParArray + parArray.tasksupport = new ForkJoinTaskSupport(new ForkJoinPool(10)) + parArray.foreach(_.partitions) + } + --- End diff -- Should we move it in `getPartitions`? Also, it will be great if we do not rely on any implicit semantic of parallel collection. I mean that we call `partitions` in parallel and get all results in a single collection explicitly.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org