code: public void submitApplication(final ApplicationSubmission applicationSubmission) throws IOException {
      final String url = "ws/v1/cluster/apps";
      final HttpPost post = preparePost(url);
  
      final StringWriter writer = new StringWriter();
      try {
        this.objectMapper.writeValue(writer, applicationSubmission);
      } catch (final IOException e) {
        throw new RuntimeException(e);
      }
      final String message = writer.toString();
      LOG.log(Level.FINE, "Sending:\n{0}", message.replace("\n", "\n\t"));
      post.setEntity(new StringEntity(message, ContentType.APPLICATION_JSON));
  
      try (final CloseableHttpResponse response = this.httpClient.execute(post, this.httpClientContext)) {
        final String responseMessage = IOUtils.toString(response.getEntity().getContent());
        LOG.log(Level.FINE, "Response: {0}", responseMessage.replace("\n", "\n\t"));
      }
    }
docs: Submits an application for execution.
  
  @param applicationSubmission
  @throws IOException