public interface ReplicaInPipelineInterface
extends org.apache.hadoop.hdfs.server.datanode.Replica
| Modifier and Type | Method and Description | 
|---|---|
| OutputStream | createRestartMetaStream()Create an output stream to write restart metadata in case of datanode
 shutting down for quick restart. | 
| ReplicaOutputStreams | createStreams(boolean isCreate,
             org.apache.hadoop.util.DataChecksum requestedChecksum)Create output streams for writing to this replica, 
 one for block file and one for CRC file | 
| long | getBytesAcked()Get the number of bytes acked | 
| ChunkChecksum | getLastChecksumAndDataLen()gets the last chunk checksum and the length of the block corresponding
 to that checksum | 
| void | releaseAllBytesReserved()Release any disk space reserved for this replica. | 
| void | setBytesAcked(long bytesAcked)Set the number bytes that have acked | 
| void | setLastChecksumAndDataLen(long dataLength,
                         byte[] lastChecksum)store the checksum for the last chunk along with the data length | 
| void | setNumBytes(long bytesReceived)Set the number of bytes received | 
void setNumBytes(long bytesReceived)
bytesReceived - number of bytes receivedlong getBytesAcked()
void setBytesAcked(long bytesAcked)
bytesAcked - number bytes ackedvoid releaseAllBytesReserved()
void setLastChecksumAndDataLen(long dataLength,
                             byte[] lastChecksum)
dataLength - number of bytes on disklastChecksum - - checksum bytes for the last chunkChunkChecksum getLastChecksumAndDataLen()
ReplicaOutputStreams createStreams(boolean isCreate, org.apache.hadoop.util.DataChecksum requestedChecksum) throws IOException
isCreate - if it is for creationrequestedChecksum - the checksum the writer would prefer to useIOException - if any error occursOutputStream createRestartMetaStream() throws IOException
IOException - if any error occursCopyright © 2022 Apache Software Foundation. All rights reserved.