spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zsxwing <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-8882][Streaming]Add a new Receiver sche...
Date Tue, 14 Jul 2015 00:25:10 GMT
Github user zsxwing commented on the pull request:

    https://github.com/apache/spark/pull/7276#issuecomment-121097747
  
    > My high-level comment / question: why not use the existing submitJob that returns
a SimpleFutureAction rather than defining your own asynchronous version of that method?
    
    The problem of `SimpleFutureAction` is its `onComplete` calls `awaitResult`. So if using
`SimpleFutureAction`, each Job needs to block one thread. It means  each running `Receiver`
needs one thread in the driver. It may exhaust threads.
    ```
      override def onComplete[U](func: (Try[T]) => U)(implicit executor: ExecutionContext)
{
        executor.execute(new Runnable {
          override def run() {
            func(awaitResult())
          }
        })
      }
    ```


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message