HBASE-13555 StackServlet produces 500 error
This commit is contained in:
parent
16f8e7f55f
commit
85d090d816
@ -21,7 +21,6 @@ import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.io.PrintStream;
|
||||
import java.io.PrintWriter;
|
||||
import java.net.BindException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.URI;
|
||||
@ -1213,11 +1212,11 @@ public class HttpServer implements FilterContainer {
|
||||
return;
|
||||
}
|
||||
response.setContentType("text/plain; charset=UTF-8");
|
||||
PrintWriter out = response.getWriter();
|
||||
PrintStream ps = new PrintStream(response.getOutputStream(), false, "UTF-8");
|
||||
Threads.printThreadInfo(ps, "");
|
||||
ps.flush();
|
||||
out.close();
|
||||
try (PrintStream out = new PrintStream(
|
||||
response.getOutputStream(), false, "UTF-8")) {
|
||||
Threads.printThreadInfo(out, "");
|
||||
out.flush();
|
||||
}
|
||||
ReflectionUtils.logThreadInfo(LOG, "jsp requested", 1);
|
||||
}
|
||||
}
|
||||
|
@ -102,14 +102,18 @@ public class RSDumpServlet extends StateDumpServlet {
|
||||
|
||||
public static void dumpQueue(HRegionServer hrs, PrintWriter out)
|
||||
throws IOException {
|
||||
if (hrs.compactSplitThread != null) {
|
||||
// 1. Print out Compaction/Split Queue
|
||||
out.println("Compaction/Split Queue summary: "
|
||||
+ hrs.compactSplitThread.toString() );
|
||||
out.println(hrs.compactSplitThread.dumpQueue());
|
||||
}
|
||||
|
||||
if (hrs.cacheFlusher != null) {
|
||||
// 2. Print out flush Queue
|
||||
out.println("\nFlush Queue summary: "
|
||||
+ hrs.cacheFlusher.toString());
|
||||
out.println(hrs.cacheFlusher.dumpQueue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user