java.io.Closeable, java.lang.AutoCloseablepublic class ReplicaOutputStreams
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Field | Description |
|---|---|---|
static org.slf4j.Logger |
LOG |
| Constructor | Description |
|---|---|
ReplicaOutputStreams(java.io.OutputStream dataOut,
java.io.OutputStream checksumOut,
org.apache.hadoop.util.DataChecksum checksum,
FsVolumeSpi volume,
FileIoProvider fileIoProvider) |
Create an object with a data output stream, a checksum output stream
and a checksum.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
void |
closeDataStream() |
|
void |
dropCacheBehindWrites(java.lang.String identifier,
long offset,
long len,
int flags) |
|
void |
flushChecksumOut() |
Flush the checksum stream if it supports it.
|
void |
flushDataOut() |
Flush the data stream if it supports it.
|
org.apache.hadoop.util.DataChecksum |
getChecksum() |
|
java.io.OutputStream |
getChecksumOut() |
|
java.io.OutputStream |
getDataOut() |
|
java.io.FileDescriptor |
getOutFd() |
|
boolean |
isTransientStorage() |
|
void |
syncChecksumOut() |
Sync the checksum stream if it supports it.
|
void |
syncDataOut() |
Sync the data stream if it supports it.
|
void |
syncFileRangeIfPossible(long offset,
long nbytes,
int flags) |
|
void |
writeDataToDisk(byte[] b,
int off,
int len) |
public ReplicaOutputStreams(java.io.OutputStream dataOut,
java.io.OutputStream checksumOut,
org.apache.hadoop.util.DataChecksum checksum,
FsVolumeSpi volume,
FileIoProvider fileIoProvider)
public java.io.FileDescriptor getOutFd()
public java.io.OutputStream getDataOut()
public java.io.OutputStream getChecksumOut()
public org.apache.hadoop.util.DataChecksum getChecksum()
public boolean isTransientStorage()
public void close()
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablepublic void closeDataStream()
throws java.io.IOException
java.io.IOExceptionpublic void syncDataOut()
throws java.io.IOException
java.io.IOExceptionpublic void syncChecksumOut()
throws java.io.IOException
java.io.IOExceptionpublic void flushDataOut()
throws java.io.IOException
java.io.IOExceptionpublic void flushChecksumOut()
throws java.io.IOException
java.io.IOExceptionpublic void writeDataToDisk(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic void syncFileRangeIfPossible(long offset,
long nbytes,
int flags)
throws org.apache.hadoop.io.nativeio.NativeIOException
org.apache.hadoop.io.nativeio.NativeIOExceptionpublic void dropCacheBehindWrites(java.lang.String identifier,
long offset,
long len,
int flags)
throws org.apache.hadoop.io.nativeio.NativeIOException
org.apache.hadoop.io.nativeio.NativeIOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.