|
||||||||||
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.ReplicaUnderRecovery
public class ReplicaUnderRecovery
This class represents replicas that are under block recovery It has a recovery id that is equal to the generation stamp that the replica will be bumped to after recovery The recovery id is used to handle multiple concurrent block recoveries. A recovery with higher recovery id preempts recoveries with a lower id.
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 | |
---|---|
ReplicaUnderRecovery(org.apache.hadoop.hdfs.server.datanode.ReplicaInfo replica,
long recoveryId)
|
|
ReplicaUnderRecovery(ReplicaUnderRecovery from)
Copy constructor. |
Method Summary | |
---|---|
org.apache.hadoop.hdfs.server.protocol.ReplicaRecoveryInfo |
createInfo()
|
boolean |
equals(Object o)
|
long |
getBytesOnDisk()
Get the number of bytes that have written to disk |
org.apache.hadoop.hdfs.server.datanode.ReplicaInfo |
getOriginalReplica()
Get the original replica that's under recovery |
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()
|
boolean |
isUnlinked()
check if this replica has already been unlinked. |
void |
setBlockId(long blockId)
|
void |
setDir(File dir)
Set the parent directory where this replica is located |
void |
setGenerationStamp(long gs)
|
void |
setNumBytes(long numBytes)
|
void |
setRecoveryID(long recoveryId)
Set the recovery id |
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, 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, 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 ReplicaUnderRecovery(org.apache.hadoop.hdfs.server.datanode.ReplicaInfo replica, long recoveryId)
public ReplicaUnderRecovery(ReplicaUnderRecovery from)
from
- Method Detail |
---|
public long getRecoveryID()
public void setRecoveryID(long recoveryId)
recoveryId
- the new recoveryIdpublic org.apache.hadoop.hdfs.server.datanode.ReplicaInfo getOriginalReplica()
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 HdfsServerConstants.ReplicaState getState()
org.apache.hadoop.hdfs.server.datanode.Replica
public long getVisibleLength()
org.apache.hadoop.hdfs.server.datanode.Replica
public long getBytesOnDisk()
org.apache.hadoop.hdfs.server.datanode.Replica
public void setBlockId(long blockId)
setBlockId
in class org.apache.hadoop.hdfs.protocol.Block
public void setGenerationStamp(long gs)
setGenerationStamp
in class org.apache.hadoop.hdfs.protocol.Block
public void setNumBytes(long numBytes)
setNumBytes
in class org.apache.hadoop.hdfs.protocol.Block
public void setDir(File dir)
org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
setDir
in class org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
dir
- the parent directory where the replica is locatedpublic 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
public org.apache.hadoop.hdfs.server.protocol.ReplicaRecoveryInfo createInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |