SPARK-4222 [CORE] use readFully in FixedLengthBinaryRecordReader
replaces the existing read() call with readFully().
Author: industrial-sloth <industrial-sloth@users.noreply.github.com>
Closes #3093 from industrial-sloth/branch-1.2-fixedLenRecRdr and squashes the following commits:
a245c8a [industrial-sloth] use readFully in FixedLengthBinaryRecordReader
(cherry picked from commit 6844e7a821
)
Signed-off-by: Matei Zaharia <matei@databricks.com>
This commit is contained in:
parent
a46497eecc
commit
f37817b18a
|
@ -115,7 +115,7 @@ private[spark] class FixedLengthBinaryRecordReader
|
|||
if (currentPosition < splitEnd) {
|
||||
// setup a buffer to store the record
|
||||
val buffer = recordValue.getBytes
|
||||
fileInputStream.read(buffer, 0, recordLength)
|
||||
fileInputStream.readFully(buffer)
|
||||
// update our current position
|
||||
currentPosition = currentPosition + recordLength
|
||||
// return true
|
||||
|
|
Loading…
Reference in a new issue