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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]