I noticed that Reboot is issued to application, when we stop YARN. It seems to be a mechanism for YARN To notify applications that they should shut down. 

Why do we throw exceptioin, instead of System.exit()? I am not sure where is such an exception be handled.