public class ReplicaInputStreams extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
ReplicaInputStreams(InputStream dataStream,
InputStream checksumStream,
FsVolumeReference volumeRef,
org.apache.hadoop.hdfs.server.datanode.FileIoProvider fileIoProvider)
Create an object with a data input stream and a checksum input stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
closeChecksumStream() |
void |
closeStreams() |
void |
dropCacheBehindReads(String identifier,
long offset,
long len,
int flags) |
InputStream |
getChecksumIn() |
InputStream |
getDataIn() |
FileDescriptor |
getDataInFd() |
FsVolumeReference |
getVolumeRef() |
void |
readChecksumFully(byte[] buf,
int off,
int len) |
void |
readDataFully(byte[] buf,
int off,
int len) |
void |
skipChecksumFully(long len) |
void |
skipDataFully(long len) |
public ReplicaInputStreams(InputStream dataStream, InputStream checksumStream, FsVolumeReference volumeRef, org.apache.hadoop.hdfs.server.datanode.FileIoProvider fileIoProvider)
public InputStream getDataIn()
public InputStream getChecksumIn()
public FileDescriptor getDataInFd()
public FsVolumeReference getVolumeRef()
public void readDataFully(byte[] buf, int off, int len) throws IOException
IOException
public void readChecksumFully(byte[] buf, int off, int len) throws IOException
IOException
public void skipDataFully(long len) throws IOException
IOException
public void skipChecksumFully(long len) throws IOException
IOException
public void closeChecksumStream() throws IOException
IOException
public void dropCacheBehindReads(String identifier, long offset, long len, int flags) throws org.apache.hadoop.io.nativeio.NativeIOException
org.apache.hadoop.io.nativeio.NativeIOException
public void closeStreams() throws IOException
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2018 Apache Software Foundation. All Rights Reserved.