You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vj...@apache.org on 2022/01/11 10:35:06 UTC
[hbase] branch branch-2.3 updated: HBASE-26657 ProfileServlet should move the output location to hbase specific directory (#4022)
This is an automated email from the ASF dual-hosted git repository.
vjasani pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.3 by this push:
new ba0f38f HBASE-26657 ProfileServlet should move the output location to hbase specific directory (#4022)
ba0f38f is described below
commit ba0f38ffc4cc46fb014dce604d2a827f3bf9033f
Author: Viraj Jasani <vj...@apache.org>
AuthorDate: Tue Jan 11 15:59:44 2022 +0530
HBASE-26657 ProfileServlet should move the output location to hbase specific directory (#4022)
Signed-off-by: Wei-Chiu Chuang <we...@apache.org>
---
hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java | 4 ++--
.../src/main/java/org/apache/hadoop/hbase/http/ProfileServlet.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
index 395c925..8d264a9 100644
--- a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
+++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
@@ -790,10 +790,10 @@ public class HttpServer implements FilterContainer {
if (Files.notExists(tmpDir)) {
Files.createDirectories(tmpDir);
}
- ServletContextHandler genCtx = new ServletContextHandler(contexts, "/prof-output");
+ ServletContextHandler genCtx = new ServletContextHandler(contexts, "/prof-output-hbase");
genCtx.addServlet(ProfileOutputServlet.class, "/*");
genCtx.setResourceBase(tmpDir.toAbsolutePath().toString());
- genCtx.setDisplayName("prof-output");
+ genCtx.setDisplayName("prof-output-hbase");
} else {
addUnprivilegedServlet("prof", "/prof", ProfileServlet.DisabledServlet.class);
LOG.info("ASYNC_PROFILER_HOME environment variable and async.profiler.home system property " +
diff --git a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/ProfileServlet.java b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/ProfileServlet.java
index 8a3ef7a..e5a6905 100644
--- a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/ProfileServlet.java
+++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/ProfileServlet.java
@@ -98,7 +98,7 @@ public class ProfileServlet extends HttpServlet {
private static final String PROFILER_SCRIPT = "/profiler.sh";
private static final int DEFAULT_DURATION_SECONDS = 10;
private static final AtomicInteger ID_GEN = new AtomicInteger(0);
- static final String OUTPUT_DIR = System.getProperty("java.io.tmpdir") + "/prof-output";
+ static final String OUTPUT_DIR = System.getProperty("java.io.tmpdir") + "/prof-output-hbase";
enum Event {
CPU("cpu"),
@@ -269,7 +269,7 @@ public class ProfileServlet extends HttpServlet {
// set response and set refresh header to output location
setResponseHeader(resp);
resp.setStatus(HttpServletResponse.SC_ACCEPTED);
- String relativeUrl = "/prof-output/" + outputFile.getName();
+ String relativeUrl = "/prof-output-hbase/" + outputFile.getName();
resp.getWriter().write(
"Started [" + event.getInternalName() +
"] profiling. This page will automatically redirect to " +