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 Closeable
close
in interface AutoCloseable
public void syncDataOut() throws IOException
IOException
public void syncChecksumOut() throws IOException
IOException
Copyright © 2017 Apache Software Foundation. All Rights Reserved.