|
||||||||||
| 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.ReplicaWaitingToBeRecovered
public class ReplicaWaitingToBeRecovered
This class represents a replica that is waiting to be recovered. After a datanode restart, any replica in "rbw" directory is loaded as a replica waiting to be recovered. A replica waiting to be recovered does not provision read nor participates in any pipeline recovery. It will become outdated if its client continues to write or be recovered as a result of lease recovery.
| 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 | |
|---|---|
ReplicaWaitingToBeRecovered(org.apache.hadoop.hdfs.protocol.Block block,
FsVolumeSpi vol,
File dir)
Constructor |
|
ReplicaWaitingToBeRecovered(long blockId,
long len,
long genStamp,
FsVolumeSpi vol,
File dir)
Constructor |
|
ReplicaWaitingToBeRecovered(ReplicaWaitingToBeRecovered from)
Copy 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, getStorageUuid, 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 ReplicaWaitingToBeRecovered(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 located
public ReplicaWaitingToBeRecovered(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 ReplicaWaitingToBeRecovered(ReplicaWaitingToBeRecovered 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.ReplicaInfopublic void setUnlinked()
org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
setUnlinked in class org.apache.hadoop.hdfs.server.datanode.ReplicaInfopublic 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.Blockpublic int hashCode()
hashCode in class org.apache.hadoop.hdfs.protocol.Blockpublic 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 | |||||||||