|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hdfs.protocol.Block
org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
org.apache.hadoop.hdfs.server.datanode.FinalizedReplica
public class FinalizedReplica
This class describes a replica that has been finalized.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.hadoop.hdfs.server.datanode.ReplicaInfo |
---|
ReplicaInfo.ReplicaDirInfo |
Field Summary |
---|
Fields inherited from class org.apache.hadoop.hdfs.protocol.Block |
---|
BLOCK_FILE_PREFIX, blockFilePattern, METADATA_EXTENSION, metaFilePattern |
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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()
|
Methods inherited from class org.apache.hadoop.hdfs.server.datanode.ReplicaInfo |
---|
getBlockFile, getMetaFile, getVolume, parseSubDirs, setDir, unlinkBlock |
Methods inherited from class org.apache.hadoop.hdfs.protocol.Block |
---|
appendStringTo, compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, write, writeId |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.hdfs.server.datanode.Replica |
---|
getBlockId, getGenerationStamp, getNumBytes |
Constructor Detail |
---|
public 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
- Method Detail |
---|
public HdfsServerConstants.ReplicaState getState()
org.apache.hadoop.hdfs.server.datanode.Replica
public boolean isUnlinked()
org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
isUnlinked
in class org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
public void setUnlinked()
org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
setUnlinked
in class org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
public long getVisibleLength()
org.apache.hadoop.hdfs.server.datanode.Replica
public long getBytesOnDisk()
org.apache.hadoop.hdfs.server.datanode.Replica
public boolean equals(Object o)
equals
in class org.apache.hadoop.hdfs.protocol.Block
public int hashCode()
hashCode
in class org.apache.hadoop.hdfs.protocol.Block
public String toString()
toString
in class org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |