code: public synchronized void stop() throws IOException, TimeoutException {
      if (this.stopped) {
        return;
      }
  
      LOGGER.info("Stopping the " + GobblinYarnAppLauncher.class.getSimpleName());
  
      try {
        if (this.applicationId.isPresent() && !this.applicationCompleted) {
          // Only send the shutdown message if the application has been successfully submitted and is still running
          sendShutdownRequest();
        }
  
        if (this.serviceManager.isPresent()) {
          this.serviceManager.get().stopAsync().awaitStopped(5, TimeUnit.MINUTES);
        }
  
        ExecutorsUtils.shutdownExecutorService(this.applicationStatusMonitor, Optional.of(LOGGER), 5, TimeUnit.MINUTES);
  
        stopYarnClient();
  
        disconnectHelixManager();
      } finally {
        try {
          if (this.applicationId.isPresent()) {
            cleanUpAppWorkDirectory(this.applicationId.get());
          }
        } finally {
          this.closer.close();
        }
      }
  
      this.stopped = true;
    }
docs: Stop this {@link GobblinYarnAppLauncher} instance.
  
  @throws IOException if this {@link GobblinYarnAppLauncher} instance fails to clean up its working directory.