[
https://issues.apache.org/jira/browse/MAPREDUCE-7167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16703827#comment-16703827
]
Saurabh commented on MAPREDUCE-7167:
------------------------------------
Hi Wangda,
Thank you for reviewing this and your suggestions. My JIRA id is saurabhpant.
Please find below observations from Tamas Payer's experiments- running MR jobs
with and without MAPREDUCE-7167 patch applied- quoting his findings:
With the patch: "When the extra "\n" are removed - along with flush() - the
line breaks are proper we only don't have the extra blank line between the json
sections." Please refer to [^nremoved.txt]
Without the patch: "When we have the flush() + "\n" the json is still well
formatted and we have the blank line between each sections." Please refer to
[^withn.txt]
Please let me know if you have any concerns or require more information.
Thanks,
Saurabh
> Extra LF ("\n") pushed directly to storage
> ------------------------------------------
>
> Key: MAPREDUCE-7167
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-7167
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Affects Versions: 3.2.0
> Reporter: Saurabh
> Priority: Major
> Attachments: image-2018-11-28-19-23-52-972.png, nremoved.txt,
> nremoved.txt, patch1128.patch, patch1128.patch, patch1128trunk.patch,
> withn.txt, withn.txt
>
>
> JsonEncoder already adds the necessary newline after writing each object as
> per [this|
> [https://github.com/apache/avro/blob/39ec1a3f0addfce06869f705f7a17c03d538fe16/lang/java/avro/src/main/java/org/apache/avro/io/JsonEncoder.java#L77]
> ] so this patch removes the "out.writeBytes("\n");". As the encoder is
> buffered, the out.writeBytes can cause JSON errors in the output stream as it
> directly writes to the output stream, hence it must be removed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]