Package org.apache.hadoop.mapred
Class FadvisedFileRegion
java.lang.Object
io.netty.util.AbstractReferenceCounted
io.netty.channel.DefaultFileRegion
org.apache.hadoop.mapred.FadvisedFileRegion
- All Implemented Interfaces:
io.netty.channel.FileRegion,io.netty.util.ReferenceCounted
public class FadvisedFileRegion
extends io.netty.channel.DefaultFileRegion
-
Constructor Summary
ConstructorsConstructorDescriptionFadvisedFileRegion(RandomAccessFile file, long position, long count, boolean manageOsCache, int readaheadLength, org.apache.hadoop.io.ReadaheadPool readaheadPool, String identifier, int shuffleBufferSize, boolean shuffleTransferToAllowed) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidCall when the transfer completes successfully so we can advise the OS that we don't need the region to be cached anymore.longtransferTo(WritableByteChannel target, long position) Methods inherited from class io.netty.channel.DefaultFileRegion
count, isOpen, open, position, retain, retain, touch, touch, transfered, transferredMethods inherited from class io.netty.util.AbstractReferenceCounted
refCnt, release, release, setRefCntMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.util.ReferenceCounted
refCnt, release, release
-
Constructor Details
-
FadvisedFileRegion
public FadvisedFileRegion(RandomAccessFile file, long position, long count, boolean manageOsCache, int readaheadLength, org.apache.hadoop.io.ReadaheadPool readaheadPool, String identifier, int shuffleBufferSize, boolean shuffleTransferToAllowed) throws IOException - Throws:
IOException
-
-
Method Details
-
transferTo
- Specified by:
transferToin interfaceio.netty.channel.FileRegion- Overrides:
transferToin classio.netty.channel.DefaultFileRegion- Throws:
IOException
-
deallocate
protected void deallocate()- Overrides:
deallocatein classio.netty.channel.DefaultFileRegion
-
transferSuccessful
public void transferSuccessful()Call when the transfer completes successfully so we can advise the OS that we don't need the region to be cached anymore.
-