Sarveksha Yeshavantha Raju created HDDS-17076:
-------------------------------------------------
Summary: Ozone debug replicas chunk-info prints log/error output
on the same line as closing brace
Key: HDDS-17076
URL: https://issues.apache.org/jira/browse/HDDS-17076
Project: Apache Ozone
Issue Type: Bug
Reporter: Sarveksha Yeshavantha Raju
Assignee: Sarveksha Yeshavantha Raju
{{ozone debug replicas chunk-info}} writes JSON to stdout through a Jackson
JsonGenerator and prints per-datanode errors (Error getting block from datanode
...) to stderr. Client logs, such as INFO scm.XceiverClientGrpc:
XceiverClientGrpc is created for pipeline ..., also go to stderr. The generator
does not end a datanode's JSON object with a newline, so when stdout and stderr
are merged, a message can be written on the same line as the closing }:
{noformat}
} ]
}
}26/10/16 11:24:19 INFO scm.XceiverClientGrpc: XceiverClientGrpc is created
for pipeline ...
], [ {
{noformat}
Tools that strip log lines by line then remove the } together with the log
message, and the remaining output is no longer valid JSON.
Fix: In ChunkKeyHandler, call System.out.println() after flushing each
datanode's JSON object, so stderr messages never share a line with JSON.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]