You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2014/11/06 00:39:10 UTC

git commit: SPARK-4222 [CORE] use readFully in FixedLengthBinaryRecordReader

Repository: spark
Updated Branches:
  refs/heads/branch-1.2 f4beb77f0 -> 6844e7a82


SPARK-4222 [CORE] use readFully in FixedLengthBinaryRecordReader

replaces the existing read() call with readFully().

Author: industrial-sloth <in...@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


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

Branch: refs/heads/branch-1.2
Commit: 6844e7a8219ac78790a422ffd5054924e7d2bea1
Parents: f4beb77
Author: industrial-sloth <in...@users.noreply.github.com>
Authored: Wed Nov 5 15:38:48 2014 -0800
Committer: Matei Zaharia <ma...@databricks.com>
Committed: Wed Nov 5 15:38:48 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/6844e7a8/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: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org