Apache9 commented on code in PR #7540:
URL: https://github.com/apache/hbase/pull/7540#discussion_r2649114912


##########
hbase-http/src/main/java/org/apache/hadoop/hbase/http/log/LogLevel.java:
##########
@@ -272,16 +284,16 @@ private void process(String urlString) throws Exception {
       // disallowed in configuration" in Jetty 9
       LogLevelExceptionUtils.validateResponse(connection, 200);
 
-      // read from the servlet
-
       try (
         InputStreamReader streamReader =
           new InputStreamReader(connection.getInputStream(), 
StandardCharsets.UTF_8);
         BufferedReader bufferedReader = new BufferedReader(streamReader)) {
-        bufferedReader.lines().filter(Objects::nonNull).filter(line -> 
line.startsWith(MARKER))
-          .forEach(line -> 
System.out.println(TAG.matcher(line).replaceAll("")));
+
+        return bufferedReader.lines().filter(Objects::nonNull)
+          .filter(line -> line.startsWith(MARKER)).map(line -> 
TAG.matcher(line).replaceAll(""))
+          .collect(Collectors.joining("\n"));
       } catch (IOException ioe) {
-        System.err.println("" + ioe);
+        return "" + ioe;

Review Comment:
   In the old logic, this will go to stderr, but now it will go to stdout? I'm 
not very familiar with this area, so I'm not sure whether this is a problem...



-- 
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]

Reply via email to