@Override
  public void doGet(HttpServletRequest request, HttpServletResponse response) {
    try {
      if (!HttpServer.isInstrumentationAccessAllowed(getServletContext(), request, response)) {
        return;
      }
      PrintWriter writer = null;

      try {
        response.setContentType("text/plain; charset=utf8");
        response.setHeader(ACCESS_CONTROL_ALLOW_METHODS, "GET");
        response.setHeader(ACCESS_CONTROL_ALLOW_ORIGIN, "*");
        response.setHeader("Cache-Control", "no-transform,public,max-age=60,s-maxage=60");

        writer = response.getWriter();

        LlapIo<?> llapIo = LlapProxy.getIo();
        if (llapIo == null) {
          writer.write("LLAP IO not found");
        } else {
          writer.write(llapIo.getMemoryInfo());
        }

      } finally {
        if (writer != null) {
          writer.close();
        }
      }
    } catch (Exception e) {
      LOG.error("Caught exception while processing llap status request", e);
      response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    }
  }
Process a GET request for the specified resource.

@param request
         The servlet request we are processing
@param response
         The servlet response we are creating
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/services/impl/LlapIoMemoryServlet.java