java.io.Closeable, java.lang.AutoCloseablepublic class ReplicaInputStreams
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Field | Description |
|---|---|---|
static org.slf4j.Logger |
LOG |
| Constructor | Description |
|---|---|
ReplicaInputStreams(java.io.InputStream dataStream,
java.io.InputStream checksumStream,
FsVolumeReference volumeRef,
FileIoProvider fileIoProvider) |
Create an object with a data input stream and a checksum input stream.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
void |
closeChecksumStream() |
|
void |
closeStreams() |
|
void |
dropCacheBehindReads(java.lang.String identifier,
long offset,
long len,
int flags) |
|
java.io.InputStream |
getChecksumIn() |
|
java.io.InputStream |
getDataIn() |
|
java.io.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(java.io.InputStream dataStream,
java.io.InputStream checksumStream,
FsVolumeReference volumeRef,
FileIoProvider fileIoProvider)
public java.io.InputStream getDataIn()
public java.io.InputStream getChecksumIn()
public java.io.FileDescriptor getDataInFd()
public FsVolumeReference getVolumeRef()
public void readDataFully(byte[] buf,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic void readChecksumFully(byte[] buf,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic void skipDataFully(long len)
throws java.io.IOException
java.io.IOExceptionpublic void skipChecksumFully(long len)
throws java.io.IOException
java.io.IOExceptionpublic void closeChecksumStream()
throws java.io.IOException
java.io.IOExceptionpublic void dropCacheBehindReads(java.lang.String identifier,
long offset,
long len,
int flags)
throws org.apache.hadoop.io.nativeio.NativeIOException
org.apache.hadoop.io.nativeio.NativeIOExceptionpublic void closeStreams()
throws java.io.IOException
java.io.IOExceptionpublic void close()
close in interface java.lang.AutoCloseableclose in interface java.io.CloseableCopyright © 2008–2025 Apache Software Foundation. All rights reserved.