spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdas <>
Subject [GitHub] spark pull request: [SPARK-11419][STREAMING] Parallel recovery for...
Date Thu, 12 Nov 2015 00:45:10 GMT
Github user tdas commented on a diff in the pull request:
    --- Diff: streaming/src/main/scala/org/apache/spark/streaming/util/FileBasedWriteAheadLog.scala
    @@ -251,4 +261,23 @@ private[streaming] object FileBasedWriteAheadLog {
         }.sortBy { _.startTime }
    +  /**
    +   * This creates an iterator from a parallel collection, by keeping at most `n` objects
in memory
    +   * at any given time, where `n` is the size of the thread pool. This is crucial for
use cases
    +   * where we create `FileBasedWriteAheadLogReader`s during parallel recovery. We don't
want to
    +   * open up `k` streams altogether where `k` is the size of the Seq that we want to
    +   */
    +  def seqToParIterator[I, O](
    +      tpool: ThreadPoolExecutor,
    +      source: Seq[I],
    +      handler: I => Iterator[O]): Iterator[O] = {
    +    val taskSupport = new ThreadPoolTaskSupport(tpool)
    +    val groupSize = math.max(math.max(tpool.getCorePoolSize, tpool.getPoolSize), 8)
    --- End diff --
    Its not safe for the rest of the system to allow infinite number of thread. I think there
should be limits. The limit can be a sparkconf that will not be exposed publicly.

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message