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 Details

    • getBlockId

      long getBlockId()
      Get the block ID
    • getGenerationStamp

      long getGenerationStamp()
      Get the generation stamp
    • 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