public class FinalizedReplica extends org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
ReplicaInfo.ReplicaDirInfo| Constructor and Description |
|---|
FinalizedReplica(org.apache.hadoop.hdfs.protocol.Block block,
FsVolumeSpi vol,
File dir)
Constructor
|
FinalizedReplica(FinalizedReplica from)
Copy constructor.
|
FinalizedReplica(long blockId,
long len,
long genStamp,
FsVolumeSpi vol,
File dir)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
long |
getBytesOnDisk()
Get the number of bytes that have written to disk
|
HdfsServerConstants.ReplicaState |
getState()
Get the replica state
|
long |
getVisibleLength()
Get the number of bytes that are visible to readers
|
int |
hashCode() |
boolean |
isUnlinked()
check if this replica has already been unlinked.
|
void |
setUnlinked()
set that this replica is unlinked
|
String |
toString() |
getBlockFile, getMetaFile, getStorageUuid, getVolume, parseSubDirs, setDir, unlinkBlockappendStringTo, compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, 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(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(FinalizedReplica from)
from - public HdfsServerConstants.ReplicaState getState()
org.apache.hadoop.hdfs.server.datanode.Replicapublic boolean isUnlinked()
org.apache.hadoop.hdfs.server.datanode.ReplicaInfoisUnlinked in class org.apache.hadoop.hdfs.server.datanode.ReplicaInfopublic void setUnlinked()
org.apache.hadoop.hdfs.server.datanode.ReplicaInfosetUnlinked in class org.apache.hadoop.hdfs.server.datanode.ReplicaInfopublic 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.BlockCopyright © 2014 Apache Software Foundation. All Rights Reserved.