public class ReplicaUnderRecovery extends LocalReplica
LocalReplica.ReplicaDirInfo
Constructor and Description |
---|
ReplicaUnderRecovery(org.apache.hadoop.hdfs.server.datanode.ReplicaInfo replica,
long recoveryId) |
ReplicaUnderRecovery(ReplicaUnderRecovery from)
Copy 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
|
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() |
void |
setBlockId(long blockId) |
void |
setGenerationStamp(long gs) |
void |
setNumBytes(long numBytes) |
void |
setRecoveryID(long recoveryId)
Set the recovery id.
|
String |
toString() |
void |
updateWithReplica(org.apache.hadoop.hdfs.server.datanode.StorageLocation replicaLocation)
Update this replica with the
StorageLocation found. |
blockDataExists, breakHardLinksIfNeeded, bumpReplicaGS, compareWith, copyBlockdata, copyMetadata, deleteBlockData, deleteMetadata, fsyncDirectory, getBlockDataLength, getBlockFile, getBlockURI, getDataInputStream, getDataOutputStream, getDir, getMetadataInputStream, getMetadataLength, getMetadataOutputStream, getMetadataURI, getMetaFile, getPinning, getPinning, metadataExists, parseBaseDir, renameData, renameMeta, setPinning, setPinning, truncateBlock, truncateBlock
getBytesReserved, getFileIoProvider, getNext, getOriginalBytesReserved, getStorageUuid, getVolume, isOnTransientStorage, setNext
appendStringTo, compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, metaToBlockFile, readFields, readId, set, toString, write, writeId
public ReplicaUnderRecovery(org.apache.hadoop.hdfs.server.datanode.ReplicaInfo replica, long recoveryId)
public ReplicaUnderRecovery(ReplicaUnderRecovery from)
from
- where to copy frompublic long getRecoveryID()
org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
getRecoveryID
in class org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
public void setRecoveryID(long recoveryId)
org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
setRecoveryID
in class org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
recoveryId
- the new recoveryIdpublic org.apache.hadoop.hdfs.server.datanode.ReplicaInfo getOriginalReplica()
getOriginalReplica
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 updateWithReplica(org.apache.hadoop.hdfs.server.datanode.StorageLocation replicaLocation)
org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
StorageLocation
found.updateWithReplica
in class LocalReplica
replicaLocation
- the StorageLocation
found for this 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
public org.apache.hadoop.hdfs.server.protocol.ReplicaRecoveryInfo createInfo()
createInfo
in class org.apache.hadoop.hdfs.server.datanode.ReplicaInfo
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.