@Override
    public void doGet(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
      if (!HttpServer.isInstrumentationAccessAllowed(getServletContext(), request, response)) {
        return;
      }
      response.setContentType("text/plain; charset=UTF-8");
      try (PrintStream out = new PrintStream(response.getOutputStream(), false, "UTF-8")) {
        Threads.printThreadInfo(out, "");
        out.flush();
      }
      ReflectionUtils.logThreadInfo(LOG, "jsp requested", 1);
    }
A very simple servlet to serve up a text representation of the current stack traces. It both
returns the stacks to the caller and logs them. Currently the stack traces are done
sequentially rather than exactly the same data.
hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java