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


##########
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:
   OK, in hadoop they have changed the behavior long ago, in this commit...
   
   
https://github.com/apache/hadoop/commit/34cc21f6d1a293d92613defba38e8ae810db4c71#diff-e2f617505927c3cbfc70219b4fde7332e84230d692f8102c0c715fa7a9fd1f82
   
   So let's also throw the IOException out.



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