Github user srowen commented on the pull request:
https://github.com/apache/spark/pull/535#issuecomment-41285569
That's a good change. As an aside, the guts of the first method could be a
call to Guava's ByteStreams.copy(). And looking a invocations of this method,
they're mostly just copying a stream to a `byte[]` which Guava also does
directly. The other usage also has a direct analog in Guava.
In fact a number of methods in the Utils class are covered in Guava, which
does manage to get a lot of the weird details completely right.
Probably a different topic but also a way to avoid this particular issue.
---
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.
---