HBASE-19424 Fix NPE in "/metrics" servlet.
Signed-off-by: Apekshit Sharma <appy@apache.org>
This commit is contained in:
parent
2509a150c0
commit
f29260cc4d
|
@ -591,6 +591,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;
|
||||
|
|
Loading…
Reference in New Issue