protected void doGet(HttpServletRequest request, HttpServletResponse response) {
    this.metrics.incomingRequests.inc();
    Optional<byte[]> serializedJobModel = this.jobInfoProvider.getSerializedJobModel();
    if (serializedJobModel.isPresent()) {
      try {
        response.getOutputStream().write(serializedJobModel.get());
        response.setContentType(CONTENT_TYPE);
        response.setStatus(HttpServletResponse.SC_OK);
        this.metrics.successfulResponses.inc();
      } catch (IOException e) {
        LOG.error("Failed to write response body", e);
        this.metrics.failedResponses.inc();
        response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
      }
    } else {
      LOG.warn("Received request for job model before job model is available");
      this.metrics.failedResponses.inc();
      response.setStatus(HttpServletResponse.SC_NOT_FOUND);
    }
  }
{@link HttpServlet} which provides access to job model.
samza-core/src/main/java/org/apache/samza/coordinator/communication/JobModelHttpServlet.java