Github user vanzin commented on the pull request:
https://github.com/apache/spark/pull/1222#issuecomment-58235956
My concern with a text-only header is that it's super tricky to parse.
You'd have to do one of the following:
* Read bytes one at a time into an array that may need to be resized
(inefficient)
* Wrap the stream in a BufferedReader and read lines, and use mark/reset so
that you can place the input at the right spot. Tricky.
* Do the above but close the stream after you find the header, then open it
again and skip over the header. Ugly.
Compare that to the binary approach, which is trivial to code. I'm not sure
the log file being in text only is that much of an argument - it can be
compressed, at which point you can't really read much. And just a tiny bit of
the header (the sizes of each entry) are in binary - the entries themselves are
just UTF8-encoded strings, which should show up fine anywhere.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]