Repository: hadoop
Updated Branches:
  refs/heads/branch-2 192594229 -> db2d96b37


MAPREDUCE-6741. Refactor UncompressedSplitLineReader.fillBuffer(). Contributed 
by Daniel Templeton.

(cherry picked from commit 0b7b8a377611b2a3041a2995504a437c36dfa6e6)


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

Branch: refs/heads/branch-2
Commit: db2d96b378d6a4ba9a504b4daaca5d8ff6f5f227
Parents: 1925942
Author: Akira Ajisaka <aajis...@apache.org>
Authored: Fri Jun 10 19:15:36 2016 +0900
Committer: Akira Ajisaka <aajis...@apache.org>
Committed: Fri Jun 10 19:17:05 2016 +0900

----------------------------------------------------------------------
 .../mapreduce/lib/input/UncompressedSplitLineReader.java     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/db2d96b3/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/UncompressedSplitLineReader.java
----------------------------------------------------------------------
diff --git 
a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/UncompressedSplitLineReader.java
 
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/UncompressedSplitLineReader.java
index bda0218..c2b005b 100644
--- 
a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/UncompressedSplitLineReader.java
+++ 
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/UncompressedSplitLineReader.java
@@ -53,10 +53,10 @@ public class UncompressedSplitLineReader extends 
SplitLineReader {
       throws IOException {
     int maxBytesToRead = buffer.length;
     if (totalBytesRead < splitLength) {
-      long leftBytesForSplit = splitLength - totalBytesRead;
-      // check if leftBytesForSplit exceed Integer.MAX_VALUE
-      if (leftBytesForSplit <= Integer.MAX_VALUE) {
-        maxBytesToRead = Math.min(maxBytesToRead, (int)leftBytesForSplit);
+      long bytesLeftInSplit = splitLength - totalBytesRead;
+
+      if (bytesLeftInSplit < maxBytesToRead) {
+        maxBytesToRead = (int)bytesLeftInSplit;
       }
     }
     int bytesRead = in.read(buffer, 0, maxBytesToRead);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to