Setting application FAILED exit status Spring Boot Yarn

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:


If you need to stop the application from outside the AppMaster class, you can make a method:

public void killApplicationWithFailedStatus() {

If you still have any questions, feel free to ask me in the comments under this article, or write me on

Leave a Reply

Your email address will not be published. Required fields are marked *