diff options
author | Josh Rosen <joshrosen@databricks.com> | 2014-10-28 00:04:16 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2014-10-28 00:04:16 -0700 |
commit | 46c63417c1bb1aea07baf9036cc5b8f1c3781bbe (patch) | |
tree | 8e30ee3760e4b9468b9a7d2b32e4d252aa953a67 /mllib | |
parent | 4ceb048b38949dd0a909d2ee6777607341c9c93a (diff) | |
download | spark-46c63417c1bb1aea07baf9036cc5b8f1c3781bbe.tar.gz spark-46c63417c1bb1aea07baf9036cc5b8f1c3781bbe.tar.bz2 spark-46c63417c1bb1aea07baf9036cc5b8f1c3781bbe.zip |
[SPARK-4107] Fix incorrect handling of read() and skip() return values
`read()` may return fewer bytes than requested; when this occurred, the old code would silently return less data than requested, which might cause stream corruption errors. `skip()` faces similar issues, too.
This patch fixes several cases where we mis-handle these methods' return values.
Author: Josh Rosen <joshrosen@databricks.com>
Closes #2969 from JoshRosen/file-channel-read-fix and squashes the following commits:
e724a9f [Josh Rosen] Fix similar issue of not checking skip() return value.
cbc03ce [Josh Rosen] Update the other log message, too.
01e6015 [Josh Rosen] file.getName -> file.getAbsolutePath
d961d95 [Josh Rosen] Fix another issue in FileServerSuite.
b9265d2 [Josh Rosen] Fix a similar (minor) issue in TestUtils.
cd9d76f [Josh Rosen] Fix a similar error in Tachyon:
3db0008 [Josh Rosen] Fix a similar read() error in Utils.offsetBytes().
db985ed [Josh Rosen] Fix unsafe usage of FileChannel.read():
Diffstat (limited to 'mllib')
0 files changed, 0 insertions, 0 deletions