Interface Replica
- All Known Subinterfaces:
ReplicaInPipeline
- All Known Implementing Classes:
BlockListAsLongs.BlockReportReplica,FinalizedProvidedReplica,FinalizedReplica,LocalReplica,LocalReplicaInPipeline,ProvidedReplica,ReplicaBeingWritten,ReplicaInfo,ReplicaUnderRecovery,ReplicaWaitingToBeRecovered
@Private
public interface Replica
This represents block replicas which are stored in DataNode.
-
Method Summary
Modifier and TypeMethodDescriptionlongGet the block IDlongGet the number of bytes that have written to disklongGet the generation stamplongGet the number of bytes receivedgetState()Get the replica stateReturn the storageUuid of the volume that stores this replica.longGet the number of bytes that are visible to readersGet the volume of replica.booleanReturn true if the target volume is backed by RAM.
-
Method Details
-
getBlockId
long getBlockId()Get the block ID -
getGenerationStamp
long getGenerationStamp()Get the generation stamp -
getState
HdfsServerConstants.ReplicaState getState()Get the replica state- Returns:
- the replica state
-
getNumBytes
long getNumBytes()Get the number of bytes received- Returns:
- the number of bytes that have been received
-
getBytesOnDisk
long getBytesOnDisk()Get the number of bytes that have written to disk- Returns:
- the number of bytes that have written to disk
-
getVisibleLength
long getVisibleLength()Get the number of bytes that are visible to readers- Returns:
- the number of bytes that are visible to readers
-
getStorageUuid
String getStorageUuid()Return the storageUuid of the volume that stores this replica. -
isOnTransientStorage
boolean isOnTransientStorage()Return true if the target volume is backed by RAM. -
getVolume
FsVolumeSpi getVolume()Get the volume of replica.- Returns:
- the volume of replica
-