aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorindustrial-sloth <industrial-sloth@users.noreply.github.com>2014-11-05 15:38:48 -0800
committerMatei Zaharia <matei@databricks.com>2014-11-05 15:39:16 -0800
commitf37817b18a479839b2e6118cc1cbd1059a94db52 (patch)
tree6acfc645bff3abb8fed0dc972def02fb087d4c0f /core
parenta46497eecc50f854c5c5701dc2b8a2468b76c085 (diff)
downloadspark-f37817b18a479839b2e6118cc1cbd1059a94db52.tar.gz
spark-f37817b18a479839b2e6118cc1cbd1059a94db52.tar.bz2
spark-f37817b18a479839b2e6118cc1cbd1059a94db52.zip
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 6844e7a8219ac78790a422ffd5054924e7d2bea1) Signed-off-by: Matei Zaharia <matei@databricks.com>
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/org/apache/spark/input/FixedLengthBinaryRecordReader.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/input/FixedLengthBinaryRecordReader.scala b/core/src/main/scala/org/apache/spark/input/FixedLengthBinaryRecordReader.scala
index 5164a74bec..36a1e5d475 100644
--- a/core/src/main/scala/org/apache/spark/input/FixedLengthBinaryRecordReader.scala
+++ b/core/src/main/scala/org/apache/spark/input/FixedLengthBinaryRecordReader.scala
@@ -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