Skip to content
Snippets Groups Projects
Commit f37817b1 authored by industrial-sloth's avatar industrial-sloth Committed by Matei Zaharia
Browse files

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 6844e7a8)
Signed-off-by: default avatarMatei Zaharia <matei@databricks.com>
parent a46497ee
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment