Skip to content

Commit

Permalink
HBASE-25685 asyncprofiler2.0 no longer supports svg; wants html (#3079)
Browse files Browse the repository at this point in the history
Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
  • Loading branch information
saintstack authored Mar 23, 2021
1 parent 7ff1d14 commit c8c043a
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
* // -b bufsize frame buffer size (long)
* // -t profile different threads separately
* // -s simple class names instead of FQN
* // -o fmt[,fmt...] output format: summary|traces|flat|collapsed|svg|tree|jfr
* // -o fmt[,fmt...] output format: summary|traces|flat|collapsed|svg|tree|jfr|html
* // --width px SVG width pixels (integer)
* // --height px SVG frame height pixels (integer)
* // --minwidth px skip frames smaller than px (double)
Expand Down Expand Up @@ -145,9 +145,12 @@ enum Output {
TRACES,
FLAT,
COLLAPSED,
// No SVG in 2.x asyncprofiler.
SVG,
TREE,
JFR
JFR,
// In 2.x asyncprofiler, this is how you get flamegraphs.
HTML
}

@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "SE_TRANSIENT_FIELD_NOT_RESTORED",
Expand Down Expand Up @@ -355,10 +358,10 @@ private Output getOutput(final HttpServletRequest req) {
try {
return Output.valueOf(outputArg.trim().toUpperCase());
} catch (IllegalArgumentException e) {
return Output.SVG;
return Output.HTML;
}
}
return Output.SVG;
return Output.HTML;
}

static void setResponseHeader(final HttpServletResponse response) {
Expand Down Expand Up @@ -387,7 +390,7 @@ protected void doGet(final HttpServletRequest req, final HttpServletResponse res
resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
setResponseHeader(resp);
resp.getWriter().write("The profiler servlet was disabled at startup.\n\n" +
"Please ensure the prerequsites for the Profiler Servlet have been installed and the\n" +
"Please ensure the prerequisites for the Profiler Servlet have been installed and the\n" +
"environment is properly configured. For more information please see\n" +
"http://hbase.apache.org/book.html#profiler\n");
return;
Expand Down

0 comments on commit c8c043a

Please sign in to comment.