jinhyukify commented on code in PR #7540:
URL: https://github.com/apache/hbase/pull/7540#discussion_r2649847985
##########
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:
Ah, I see this code originally came from Hadoop. Thanks for checking and
confirming.
Fixed in 6b038526a2ffeac5219c8b2ea138a7c09190f32f
--
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]