Repository: spark
Updated Branches:
  refs/heads/master a46497eec -> f37817b18


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

(cherry picked from commit 6844e7a8219ac78790a422ffd5054924e7d2bea1)
Signed-off-by: Matei Zaharia <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f37817b1
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f37817b1
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f37817b1

Branch: refs/heads/master
Commit: f37817b18a479839b2e6118cc1cbd1059a94db52
Parents: a46497e
Author: industrial-sloth <[email protected]>
Authored: Wed Nov 5 15:38:48 2014 -0800
Committer: Matei Zaharia <[email protected]>
Committed: Wed Nov 5 15:39:16 2014 -0800

----------------------------------------------------------------------
 .../org/apache/spark/input/FixedLengthBinaryRecordReader.scala     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/f37817b1/core/src/main/scala/org/apache/spark/input/FixedLengthBinaryRecordReader.scala
----------------------------------------------------------------------
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 5164a74..36a1e5d 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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to