Let’s say we need to terminate Spring Boot Yarn application due to checked exception. To do this, in the AppMaster class (it must be specified in the appmaster-class property in application.yml) we need to call the method in the place we need:
super.setFinalApplicationStatus(FinalApplicationStatus.FAILED);
If you need to stop the application from outside the AppMaster class, you can make a method:
public void killApplicationWithFailedStatus() {
super.setFinalApplicationStatus(FinalApplicationStatus.FAILED)
super.doStop();
}
If you still have any questions, feel free to ask me in the comments under this article, or write me on promark33@gmail.com.