Skip to content

Commit 202b17f

Browse files
committed
HBASE-25685 asyncprofiler2.0 no longer supports svg; wants html (#3079)
Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
1 parent 87d0533 commit 202b17f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

hbase-http/src/main/java/org/apache/hadoop/hbase/http/ProfileServlet.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
* // -b bufsize frame buffer size (long)
4949
* // -t profile different threads separately
5050
* // -s simple class names instead of FQN
51-
* // -o fmt[,fmt...] output format: summary|traces|flat|collapsed|svg|tree|jfr
51+
* // -o fmt[,fmt...] output format: summary|traces|flat|collapsed|svg|tree|jfr|html
5252
* // --width px SVG width pixels (integer)
5353
* // --height px SVG frame height pixels (integer)
5454
* // --minwidth px skip frames smaller than px (double)
@@ -145,9 +145,12 @@ enum Output {
145145
TRACES,
146146
FLAT,
147147
COLLAPSED,
148+
// No SVG in 2.x asyncprofiler.
148149
SVG,
149150
TREE,
150-
JFR
151+
JFR,
152+
// In 2.x asyncprofiler, this is how you get flamegraphs.
153+
HTML
151154
}
152155

153156
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "SE_TRANSIENT_FIELD_NOT_RESTORED",
@@ -358,10 +361,10 @@ private Output getOutput(final HttpServletRequest req) {
358361
try {
359362
return Output.valueOf(outputArg.trim().toUpperCase());
360363
} catch (IllegalArgumentException e) {
361-
return Output.SVG;
364+
return Output.HTML;
362365
}
363366
}
364-
return Output.SVG;
367+
return Output.HTML;
365368
}
366369

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

0 commit comments

Comments
 (0)