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:17:38 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1.4 e81b88678 -> 997a1585a


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/997a1585
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/997a1585
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/997a1585

Branch: refs/heads/branch-1.4
Commit: 997a1585a414bce1ffbf4576e1ea42a9a58a3a96
Parents: e81b886
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:17:28 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/997a1585/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