public class FinalizedReplica extends LocalReplica
LocalReplica.ReplicaDirInfo| Constructor and Description | 
|---|
| FinalizedReplica(org.apache.hadoop.hdfs.protocol.Block block,
                FsVolumeSpi vol,
                File dir)Constructor | 
| FinalizedReplica(org.apache.hadoop.hdfs.protocol.Block block,
                FsVolumeSpi vol,
                File dir,
                byte[] checksum)Constructor | 
| FinalizedReplica(FinalizedReplica from)Copy constructor. | 
| FinalizedReplica(long blockId,
                long len,
                long genStamp,
                FsVolumeSpi vol,
                File dir)Constructor. | 
| FinalizedReplica(long blockId,
                long len,
                long genStamp,
                FsVolumeSpi vol,
                File dir,
                byte[] checksum)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| org.apache.hadoop.hdfs.server.protocol.ReplicaRecoveryInfo | createInfo() | 
| boolean | equals(Object o) | 
| long | getBytesOnDisk()Get the number of bytes that have written to disk | 
| byte[] | getLastPartialChunkChecksum() | 
| long | getMetadataLength() | 
| org.apache.hadoop.hdfs.server.datanode.ReplicaInfo | getOriginalReplica() | 
| long | getRecoveryID()Get the recovery id. | 
| HdfsServerConstants.ReplicaState | getState()Get the replica state | 
| long | getVisibleLength()Get the number of bytes that are visible to readers | 
| int | hashCode() | 
| void | loadLastPartialChunkChecksum() | 
| void | setLastPartialChunkChecksum(byte[] checksum) | 
| void | setRecoveryID(long recoveryId)Set the recovery id. | 
| String | toString() | 
blockDataExists, breakHardLinksIfNeeded, bumpReplicaGS, compareWith, copyBlockdata, copyMetadata, deleteBlockData, deleteMetadata, fsyncDirectory, getBlockDataLength, getBlockFile, getBlockURI, getDataInputStream, getDataOutputStream, getDir, getMetadataInputStream, getMetadataOutputStream, getMetadataURI, getMetaFile, getPinning, getPinning, metadataExists, parseBaseDir, renameData, renameMeta, setPinning, setPinning, truncateBlock, truncateBlock, updateWithReplicagetBytesReserved, getFileIoProvider, getNext, getOriginalBytesReserved, getStorageUuid, getVolume, isOnTransientStorage, setNextappendStringTo, compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, metaToBlockFile, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, toString, write, writeIdpublic FinalizedReplica(long blockId,
                        long len,
                        long genStamp,
                        FsVolumeSpi vol,
                        File dir)
blockId - block idlen - replica lengthgenStamp - replica generation stampvol - volume where replica is locateddir - directory path where block and meta files are locatedpublic FinalizedReplica(long blockId,
                        long len,
                        long genStamp,
                        FsVolumeSpi vol,
                        File dir,
                        byte[] checksum)
blockId - block idlen - replica lengthgenStamp - replica generation stampvol - volume where replica is locateddir - directory path where block and meta files are locatedchecksum - the last partial chunk checksumpublic FinalizedReplica(org.apache.hadoop.hdfs.protocol.Block block,
                        FsVolumeSpi vol,
                        File dir)
block - a blockvol - volume where replica is locateddir - directory path where block and meta files are locatedpublic FinalizedReplica(org.apache.hadoop.hdfs.protocol.Block block,
                        FsVolumeSpi vol,
                        File dir,
                        byte[] checksum)
block - a blockvol - volume where replica is locateddir - directory path where block and meta files are locatedchecksum - the last partial chunk checksumpublic FinalizedReplica(FinalizedReplica from)
from - where to copy construct frompublic HdfsServerConstants.ReplicaState getState()
org.apache.hadoop.hdfs.server.datanode.Replicapublic long getVisibleLength()
org.apache.hadoop.hdfs.server.datanode.Replicapublic long getBytesOnDisk()
org.apache.hadoop.hdfs.server.datanode.Replicapublic boolean equals(Object o)
equals in class org.apache.hadoop.hdfs.protocol.Blockpublic int hashCode()
hashCode in class org.apache.hadoop.hdfs.protocol.Blockpublic String toString()
toString in class org.apache.hadoop.hdfs.server.datanode.ReplicaInfopublic org.apache.hadoop.hdfs.server.datanode.ReplicaInfo getOriginalReplica()
getOriginalReplica in class org.apache.hadoop.hdfs.server.datanode.ReplicaInfopublic long getRecoveryID()
org.apache.hadoop.hdfs.server.datanode.ReplicaInfogetRecoveryID in class org.apache.hadoop.hdfs.server.datanode.ReplicaInfopublic void setRecoveryID(long recoveryId)
org.apache.hadoop.hdfs.server.datanode.ReplicaInfosetRecoveryID in class org.apache.hadoop.hdfs.server.datanode.ReplicaInforecoveryId - the new recoveryIdpublic org.apache.hadoop.hdfs.server.protocol.ReplicaRecoveryInfo createInfo()
createInfo in class org.apache.hadoop.hdfs.server.datanode.ReplicaInfopublic long getMetadataLength()
getMetadataLength in class LocalReplicapublic byte[] getLastPartialChunkChecksum()
public void setLastPartialChunkChecksum(byte[] checksum)
public void loadLastPartialChunkChecksum()
                                  throws IOException
IOExceptionCopyright © 2008–2023 Apache Software Foundation. All rights reserved.