code: @Override
    public void onShutdownRequest() {
      this.reefEventHandlers.onRuntimeStatus(RuntimeStatusEventImpl.newBuilder()
          .setName(RUNTIME_NAME).setState(State.DONE).build());
      this.driverStatusManager.onError(new Exception("Shutdown requested by YARN."));
    }
docs: RM Callback: RM requests application shutdown.