hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject hbase git commit: HBASE-19424 Fix NPE in "/metrics" servlet.
Date Mon, 08 Jan 2018 23:09:46 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 fa07c211a -> e6453ab84


HBASE-19424 Fix NPE in "/metrics" servlet.

Signed-off-by: Apekshit Sharma <appy@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e6453ab8
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e6453ab8
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e6453ab8

Branch: refs/heads/branch-1
Commit: e6453ab84baa744dedc0a81cabbd1e9770d41c97
Parents: fa07c21
Author: Toshihiro Suzuki <brfrn169@gmail.com>
Authored: Mon Jan 8 15:07:47 2018 -0800
Committer: Apekshit Sharma <appy@apache.org>
Committed: Mon Jan 8 15:09:27 2018 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/http/HttpServer.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/e6453ab8/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
index a8ed8a4..aa4dbc7 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java
@@ -605,6 +605,9 @@ public class HttpServer implements FilterContainer {
     ctx.setContextPath("/");
     ctx.setWar(appDir + "/" + name);
     ctx.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, conf);
+    // for org.apache.hadoop.metrics.MetricsServlet
+    ctx.getServletContext().setAttribute(
+      org.apache.hadoop.http.HttpServer2.CONF_CONTEXT_ATTRIBUTE, conf);
     ctx.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
     addNoCacheFilter(ctx);
     return ctx;


Mime
View raw message