diff options
author | Karen Feng <karenfeng.us@gmail.com> | 2013-07-10 14:52:29 -0700 |
---|---|---|
committer | Karen Feng <karenfeng.us@gmail.com> | 2013-07-10 14:52:29 -0700 |
commit | f5f3b272f874a3ac22f4e0b2caab9053657a9124 (patch) | |
tree | 7fc4d633b6e4bc77a1808bb85368b9118e644fa0 /core/src/main | |
parent | dbe948d9a2198845feb7c8bfa738286db41344d9 (diff) | |
download | spark-f5f3b272f874a3ac22f4e0b2caab9053657a9124.tar.gz spark-f5f3b272f874a3ac22f4e0b2caab9053657a9124.tar.bz2 spark-f5f3b272f874a3ac22f4e0b2caab9053657a9124.zip |
Fixed mixup of start/end, moved more import files
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/scala/spark/Utils.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/main/scala/spark/Utils.scala b/core/src/main/scala/spark/Utils.scala index 1c5af2700a..1da9c9574e 100644 --- a/core/src/main/scala/spark/Utils.scala +++ b/core/src/main/scala/spark/Utils.scala @@ -625,8 +625,8 @@ private object Utils extends Logging { def offsetBytes(path: String, start: Long, end: Long): String = { val file = new File(path) val length = file.length() - val effectiveStart = math.min(length, start) - val effectiveEnd = math.max(0, end) + val effectiveEnd = math.min(length, end) + val effectiveStart = math.max(0, start) val buff = new Array[Byte]((effectiveEnd-effectiveStart).toInt) val stream = new FileInputStream(file) |