Skip to content

Commit 6844e7a

Browse files
industrial-slothmateiz
authored andcommitted
SPARK-4222 [CORE] use readFully in FixedLengthBinaryRecordReader
replaces the existing read() call with readFully(). Author: industrial-sloth <[email protected]> Closes #3093 from industrial-sloth/branch-1.2-fixedLenRecRdr and squashes the following commits: a245c8a [industrial-sloth] use readFully in FixedLengthBinaryRecordReader
1 parent f4beb77 commit 6844e7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/input/FixedLengthBinaryRecordReader.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private[spark] class FixedLengthBinaryRecordReader
115115
if (currentPosition < splitEnd) {
116116
// setup a buffer to store the record
117117
val buffer = recordValue.getBytes
118-
fileInputStream.read(buffer, 0, recordLength)
118+
fileInputStream.readFully(buffer)
119119
// update our current position
120120
currentPosition = currentPosition + recordLength
121121
// return true

0 commit comments

Comments
 (0)