From cd35b692de88e3afe7f41405da635c3fbd9b4650 Mon Sep 17 00:00:00 2001 From: Eric Payne Date: Tue, 10 May 2016 15:45:01 +0000 Subject: [PATCH] MAPREDUCE-6678. Allow ShuffleHandler readahead without drop-behind. Contributed by Nathan Roberts. --- .../main/java/org/apache/hadoop/mapred/FadvisedFileRegion.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6fd46a5310..cb9b5e088e 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 FadvisedFileRegion(RandomAccessFile file, long position, long count, @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);