public class ReplicaUnderRecovery extends ReplicaInfo
ReplicaInfo.ReplicaDirInfoBLOCK_FILE_PREFIX, blockFilePattern, METADATA_EXTENSION, metaFilePattern| Constructor and Description |
|---|
ReplicaUnderRecovery(ReplicaInfo replica,
long recoveryId) |
ReplicaUnderRecovery(ReplicaUnderRecovery from)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ReplicaRecoveryInfo |
createInfo() |
boolean |
equals(Object o) |
long |
getBytesOnDisk()
Get the number of bytes that have written to disk
|
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() |
getBlockFile, getMetaFile, getVolume, parseSubDirs, unlinkBlockappendStringTo, compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, readFields, readId, set, write, writeIdclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBlockId, getGenerationStamp, getNumBytespublic ReplicaUnderRecovery(ReplicaInfo replica, long recoveryId)
public ReplicaUnderRecovery(ReplicaUnderRecovery from)
from - public long getRecoveryID()
public void setRecoveryID(long recoveryId)
recoveryId - the new recoveryIdpublic ReplicaInfo getOriginalReplica()
public boolean isUnlinked()
ReplicaInfoisUnlinked in class ReplicaInfopublic void setUnlinked()
ReplicaInfosetUnlinked in class ReplicaInfopublic HdfsServerConstants.ReplicaState getState()
Replicapublic long getVisibleLength()
Replicapublic long getBytesOnDisk()
Replicapublic void setBlockId(long blockId)
setBlockId in class Blockpublic void setGenerationStamp(long gs)
setGenerationStamp in class Blockpublic void setNumBytes(long numBytes)
setNumBytes in class Blockpublic void setDir(File dir)
ReplicaInfosetDir in class ReplicaInfodir - the parent directory where the replica is locatedpublic String toString()
toString in class ReplicaInfopublic ReplicaRecoveryInfo createInfo()
Copyright © 2013 Apache Software Foundation. All rights reserved.