Skip to content
Snippets Groups Projects
Commit 6844e7a8 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
parent f4beb77f
No related branches found
No related tags found
No related merge requests found
...@@ -115,7 +115,7 @@ private[spark] class FixedLengthBinaryRecordReader ...@@ -115,7 +115,7 @@ private[spark] class FixedLengthBinaryRecordReader
if (currentPosition < splitEnd) { if (currentPosition < splitEnd) {
// setup a buffer to store the record // setup a buffer to store the record
val buffer = recordValue.getBytes val buffer = recordValue.getBytes
fileInputStream.read(buffer, 0, recordLength) fileInputStream.readFully(buffer)
// update our current position // update our current position
currentPosition = currentPosition + recordLength currentPosition = currentPosition + recordLength
// return true // 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