Hi Thad, To clarify, are you looking for an API in the client to invoke a callback when a session has shut down? Or invoke user logic in the AM when the session is about to shut down?
For the former, given that client does not poll the session continuously, detecting the session shutdown is only done when an API is invoked that requires the client to communicate with the AM. In such cases, a SessionNotRunning exception should be thrown. If you are looking at maintaining a live session handle all the time, one approach maybe to launch a thread that periodically invokes getAppMasterStatus and handle cases when the session has died. For the latter, there is no such support today. — Hitesh On Aug 11, 2014, at 11:14 AM, Bikas Saha <bi...@hortonworks.com> wrote: > This tracks it https://issues.apache.org/jira/browse/TEZ-1191 > > From: Thaddeus Diamond [mailto:thaddeus.diam...@gmail.com] > Sent: Monday, August 11, 2014 9:03 AM > To: user@tez.apache.org > Subject: Application Shutdown > > Hey, > > Is there a way to trap a Tez session shutdown on JVM shutdown? The best I > can think of is some manual shutdown hook like > http://stackoverflow.com/questions/2921945/useful-example-of-a-shutdown-hook-in-java, > but it would be nice to be able to say: > > TezClient tezSession = new TezClient(...); > tezSession.shutdownOnJvmExit(); > tezSession.start(); > > Or some TezConfiguration setting. > > Is there something like this? Should I file a JIRA? > > - Thad > > CONFIDENTIALITY NOTICE > NOTICE: This message is intended for the use of the individual or entity to > which it is addressed and may contain information that is confidential, > privileged and exempt from disclosure under applicable law. If the reader of > this message is not the intended recipient, you are hereby notified that any > printing, copying, dissemination, distribution, disclosure or forwarding of > this communication is strictly prohibited. If you have received this > communication in error, please contact the sender immediately and delete it > from your system. Thank You.