Apache9 commented on code in PR #7540:
URL: https://github.com/apache/hbase/pull/7540#discussion_r2649726702
##########
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:
Tried blaming the code and checking the history, seems we just copied it
from hadoop, where it was like this in the first place...
https://github.com/apache/hbase/commit/26096f363e8645ec61982ef26073e3172f1ce91c#diff-b4ce56ed340edb8a81d682407d525acea495757156a146724ae59b485ea13a13
--
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]