Spring Boot YARN exit status
What's inside this article
⌄
- Setting application FAILED exit status Spring Boot Yarn
- Spring Boot Yarn set exit status
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 we need to stop the application from outside the AppMaster class, we can make a method:
public void killApplicationWithFailedStatus() {
super.setFinalApplicationStatus(FinalApplicationStatus.FAILED);
super.doStop();
}