Repository: hadoop
Updated Branches:
  refs/heads/branch-2 e0d6a9632 -> 77d147e0e


MAPREDUCE-6678. Allow ShuffleHandler readahead without drop-behind. Contributed 
by Nathan Roberts.
(cherry picked from commit cd35b692de88e3afe7f41405da635c3fbd9b4650)


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

Branch: refs/heads/branch-2
Commit: 77d147e0eca5958c3f18c1214492c43670fb4d36
Parents: e0d6a96
Author: Eric Payne <[email protected]>
Authored: Tue May 10 15:45:01 2016 +0000
Committer: Eric Payne <[email protected]>
Committed: Tue May 10 16:04:09 2016 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/mapred/FadvisedFileRegion.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/77d147e0/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/FadvisedFileRegion.java
----------------------------------------------------------------------
diff --git 
a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/FadvisedFileRegion.java
 
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/FadvisedFileRegion.java
index 6fd46a5..cb9b5e0 100644
--- 
a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/FadvisedFileRegion.java
+++ 
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/FadvisedFileRegion.java
@@ -74,7 +74,7 @@ public class FadvisedFileRegion extends DefaultFileRegion {
   @Override
   public long transferTo(WritableByteChannel target, long position)
       throws IOException {
-    if (manageOsCache && readaheadPool != null) {
+    if (readaheadPool != null && readaheadLength > 0) {
       readaheadRequest = readaheadPool.readaheadStream(identifier, fd,
           getPosition() + position, readaheadLength,
           getPosition() + getCount(), readaheadRequest);


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

Reply via email to