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

    Constructors
    Constructor
    Description
    FadvisedFileRegion(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 Type
    Method
    Description
    protected void
     
    void
    Call when the transfer completes successfully so we can advise the OS that we don't need the region to be cached anymore.
    long
    transferTo(WritableByteChannel target, long position)
     

    Methods inherited from class io.netty.channel.DefaultFileRegion

    count, isOpen, open, position, retain, retain, touch, touch, transfered, transferred

    Methods inherited from class io.netty.util.AbstractReferenceCounted

    refCnt, release, release, setRefCnt

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

      public long transferTo(WritableByteChannel target, long position) throws IOException
      Specified by:
      transferTo in interface io.netty.channel.FileRegion
      Overrides:
      transferTo in class io.netty.channel.DefaultFileRegion
      Throws:
      IOException
    • deallocate

      protected void deallocate()
      Overrides:
      deallocate in class io.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.