public class ReplicaUnderRecovery extends ReplicaInfo
ReplicaInfo.ReplicaDirInfo
BLOCK_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, unlinkBlock
appendStringTo, compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, readFields, readId, set, write, writeId
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getBlockId, getGenerationStamp, getNumBytes
public 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()
ReplicaInfo
isUnlinked
in class ReplicaInfo
public void setUnlinked()
ReplicaInfo
setUnlinked
in class ReplicaInfo
public HdfsServerConstants.ReplicaState getState()
Replica
public long getVisibleLength()
Replica
public long getBytesOnDisk()
Replica
public void setBlockId(long blockId)
setBlockId
in class Block
public void setGenerationStamp(long gs)
setGenerationStamp
in class Block
public void setNumBytes(long numBytes)
setNumBytes
in class Block
public void setDir(File dir)
ReplicaInfo
setDir
in class ReplicaInfo
dir
- the parent directory where the replica is locatedpublic String toString()
toString
in class ReplicaInfo
public ReplicaRecoveryInfo createInfo()
Copyright © 2013 Apache Software Foundation. All rights reserved.