MAPREDUCE-6678. Allow ShuffleHandler readahead without drop-behind. Contributed 
by Nathan Roberts.


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

Branch: refs/heads/HDFS-1312
Commit: cd35b692de88e3afe7f41405da635c3fbd9b4650
Parents: 87f5e35
Author: Eric Payne <epa...@apache.org>
Authored: Tue May 10 15:45:01 2016 +0000
Committer: Eric Payne <epa...@apache.org>
Committed: Tue May 10 15:45:01 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/cd35b692/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: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to