public class ReplicaOutputStreams extends Object implements Closeable
| Constructor and Description |
|---|
ReplicaOutputStreams(OutputStream dataOut,
OutputStream checksumOut,
org.apache.hadoop.util.DataChecksum checksum,
boolean isTransientStorage)
Create an object with a data output stream, a checksum output stream
and a checksum.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.hadoop.util.DataChecksum |
getChecksum() |
OutputStream |
getChecksumOut() |
OutputStream |
getDataOut() |
boolean |
isTransientStorage() |
void |
syncChecksumOut()
Sync the checksum stream if it supports it.
|
void |
syncDataOut()
Sync the data stream if it supports it.
|
public ReplicaOutputStreams(OutputStream dataOut, OutputStream checksumOut, org.apache.hadoop.util.DataChecksum checksum, boolean isTransientStorage)
public OutputStream getDataOut()
public OutputStream getChecksumOut()
public org.apache.hadoop.util.DataChecksum getChecksum()
public boolean isTransientStorage()
public void close()
close in interface Closeableclose in interface AutoCloseablepublic void syncDataOut() throws IOException
IOExceptionpublic void syncChecksumOut() throws IOException
IOExceptionCopyright © 2017 Apache Software Foundation. All Rights Reserved.