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

(cherry picked from commit cd35b692de)
This commit is contained in:
Eric Payne 2016-05-10 15:45:01 +00:00
parent e0d6a9632d
commit 77d147e0ec
1 changed files with 1 additions and 1 deletions

View File

@ -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);