Skip to content

Commit 045f837

Browse files
committed
Addressed review comments
1 parent 3ea676d commit 045f837

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public class HttpServer implements FilterContainer {
154154
public static final String SPNEGO_PROXYUSER_FILTER = "SpnegoProxyUserFilter";
155155
public static final String NO_CACHE_FILTER = "NoCacheFilter";
156156
public static final String APP_DIR = "webapps";
157-
public static final String HTTP_UI_SHOW_STACKTRACE_KEY = "hbase.ui.showStackTraces";
157+
public static final String HTTP_UI_SHOW_STACKTRACE_KEY = "hbase.ui.show-stack-traces";
158158

159159
public static final String METRIC_SERVLETS_CONF_KEY = "hbase.http.metrics.servlets";
160160
public static final String[] METRICS_SERVLETS_DEFAULT = { "jmx", "metrics", "prometheus" };
@@ -655,9 +655,8 @@ private void initializeWebServer(String name, String hostName, Configuration con
655655
}
656656
}
657657
// Check if disable stack trace property is configured
658-
if (null != conf.get(HTTP_UI_SHOW_STACKTRACE_KEY, null)) {
659-
// Get the configured value
660-
boolean showStackTraces = conf.getBoolean(HTTP_UI_SHOW_STACKTRACE_KEY, false);
658+
boolean showStackTraces = conf.getBoolean(HTTP_UI_SHOW_STACKTRACE_KEY, false);
659+
if (showStackTraces)) {
661660
// Disable stack traces for server errors in UI
662661
webServer.setErrorHandler(new ErrorHandler());
663662
webServer.getErrorHandler().setShowStacks(showStackTraces);

src/main/asciidoc/_chapters/security.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ To disable showing stack traces in HBase UI for hiding sensitive information, se
207207
[source,xml]
208208
----
209209
<property>
210-
<name>hbase.ui.showStackTraces</name>
210+
<name>hbase.ui.show-stack-traces</name>
211211
<value>false</value>
212212
</property>
213213
----

0 commit comments

Comments
 (0)