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
IOExceptionpublic void readChecksumFully(byte[] buf,
int off,
int len)
throws IOException
IOExceptionpublic void skipDataFully(long len)
throws IOException
IOExceptionpublic void skipChecksumFully(long len)
throws IOException
IOExceptionpublic void closeChecksumStream()
throws IOException
IOExceptionpublic void dropCacheBehindReads(String identifier, long offset, long len, int flags) throws org.apache.hadoop.io.nativeio.NativeIOException
org.apache.hadoop.io.nativeio.NativeIOExceptionpublic void closeStreams()
throws IOException
IOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2008–2023 Apache Software Foundation. All rights reserved.