@Override
    public void doGet(HttpServletRequest request, HttpServletResponse response) {
      JsonGenerator jg = null;
      PrintWriter writer = null;
      final ServletContext context = getServletContext();
      final Object parent = context.getAttribute(PARENT_ATTRIBUTE);

      final long uptime = runtimeBean.getUptime();

      try {
        try {
          writer = response.getWriter();

          response.setContentType("application/json; charset=utf8");
          response.setHeader(ACCESS_CONTROL_ALLOW_METHODS, "GET");
          response.setHeader(ACCESS_CONTROL_ALLOW_ORIGIN, "*");
          jg = jsonFactory.createJsonGenerator(writer);
          jg.disable(JsonGenerator.Feature.AUTO_CLOSE_TARGET);
          jg.useDefaultPrettyPrinter();
          jg.writeStartObject();
          if (parent != null && parent instanceof CompositeService) {
            jg.writeStringField(STATUS_ATTRIBUTE, ((CompositeService) parent).getServiceState()
                .toString());
          } else {
            jg.writeStringField(STATUS_ATTRIBUTE, UNKNOWN_STATE);
          }
          jg.writeNumberField(UPTIME_ATTRIBUTE, uptime);
          jg.writeStringField(BUILD_ATTRIBUTE, HiveVersionInfo.getBuildVersion());
          jg.writeEndObject();
        } finally {
          if (jg != null) {
            jg.close();
          }
          if (writer != null) {
            writer.close();
          }
        }
      } catch (IOException e) {
        LOG.error("Caught an exception while processing /status request", e);
        response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
      }
    }
Possible values: UNKNOWN, NOTINITED, INITED, STARTED, STOPPED
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/services/impl/LlapWebServices.java