Hi,
Currently the error can be retrieved via `TwillController.terminate().get()`
call, as stated in the javadoc of the `terminate()` method.
* Calling this method multiple times is allowed and a {@link Future}
representing the termination state
* will be returned.
Terence
> On Jan 5, 2017, at 11:17 PM, Yuliya Feldman <[email protected]> wrote:
>
> Hello there,
>
> I am trying to use async APIs to start/stop Twill managed Yarn Application.
>
> I am using onRunning() and onTerminated() APIs for this, but I don't see a
> way of retrieving an error in case of failure
>
> public void onTerminated(final Runnable runnable, Executor executor) {
> this.addListener(new ServiceListenerAdapter() {
> public void failed(State from, Throwable failure) {
> runnable.run();
> }
>
> public void terminated(State from) {
> runnable.run();
> }
> }, executor);
> }
>
>
> Is there is a way of retrieving "Throwable failure" ?
>
> Or am I using wrong APIs?
>
> Thanks