Thank you Terrence
On Fri, Jan 6, 2017 at 12:37 AM, Terence Yim <cht...@gmail.com> wrote: > Hi, > > It depends on when the failure happen. If the app is already submitted to > YARN successfully and failed afterwards, it should still get reflected > through the Future returned by the teminate() call. However, due to > https://issues.apache.org/jira/browse/TWILL-180 < > https://issues.apache.org/jira/browse/TWILL-180>, it is currently not > reflected correctly. > > Terence > > > On Jan 6, 2017, at 12:30 AM, Yuliya Feldman <yul...@dremio.com> wrote: > > > > Thank you > > > > What about retrieving error if it fails to start? > > > > On Fri, Jan 6, 2017 at 12:12 AM, Terence Yim <cht...@gmail.com> wrote: > > > >> 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 <yul...@dremio.com> 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 > >> > >> > >