Class ReplicaInputStreams

java.lang.Object
org.apache.hadoop.hdfs.server.datanode.fsdataset.ReplicaInputStreams
All Implemented Interfaces:
Closeable, AutoCloseable

public class ReplicaInputStreams extends Object implements Closeable
Contains the input streams for the data and checksum of a replica.
  • Field Details

    • LOG

      public static final org.slf4j.Logger LOG
  • Constructor Details

  • Method Details

    • getDataIn

      public InputStream getDataIn()
      Returns:
      the data input stream.
    • getChecksumIn

      public InputStream getChecksumIn()
      Returns:
      the checksum input stream.
    • getDataInFd

      public FileDescriptor getDataInFd()
    • getVolumeRef

      public FsVolumeReference getVolumeRef()
    • readDataFully

      public void readDataFully(byte[] buf, int off, int len) throws IOException
      Throws:
      IOException
    • readChecksumFully

      public void readChecksumFully(byte[] buf, int off, int len) throws IOException
      Throws:
      IOException
    • skipDataFully

      public void skipDataFully(long len) throws IOException
      Throws:
      IOException
    • skipChecksumFully

      public void skipChecksumFully(long len) throws IOException
      Throws:
      IOException
    • closeChecksumStream

      public void closeChecksumStream() throws IOException
      Throws:
      IOException
    • dropCacheBehindReads

      public void dropCacheBehindReads(String identifier, long offset, long len, int flags) throws org.apache.hadoop.io.nativeio.NativeIOException
      Throws:
      org.apache.hadoop.io.nativeio.NativeIOException
    • closeStreams

      public void closeStreams() throws IOException
      Throws:
      IOException
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable