@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")) {
      printThreadInfo(out, "");
    }
  }
A servlet to print out the current stack traces.
common/src/java/org/apache/hive/http/StackServlet.java