jojochuang commented on a change in pull request #3549:
URL: https://github.com/apache/hbase/pull/3549#discussion_r681576074
##########
File path:
hbase-http/src/main/java/org/apache/hadoop/hbase/http/log/LogLevel.java
##########
@@ -360,6 +368,18 @@ public void doGet(HttpServletRequest request,
HttpServletResponse response)
out.close();
}
+ private boolean isLogLevelChangeAllowed(String logger, String[]
readOnlyLogLevels) {
+ if (readOnlyLogLevels == null) {
+ return true;
+ }
+ for (String readOnlyLogLevel : readOnlyLogLevels) {
+ if (readOnlyLogLevel.startsWith(logger)) {
Review comment:
i would have thought it's the other way around: logger.
startsWith(readOnlyLogLevel)? not sure.
It would be best if we can verify this new feature in TestLogLevel.
##########
File path:
hbase-http/src/main/java/org/apache/hadoop/hbase/http/log/LogLevel.java
##########
@@ -345,6 +347,12 @@ public void doGet(HttpServletRequest request,
HttpServletResponse response)
out.println(MARKER
+ "Log Class: <b>" + log.getClass().getName() +"</b><br />");
if (level != null) {
+ if (!isLogLevelChangeAllowed(logName, readOnlyLogLevels)) {
+ response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED,
Review comment:
yup make sense to me. It seems HBase doesn't validate the error
messages, which is why this problem doesn't surface up when we bumped Jetty
version.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]