Class BlockListAsLongs.BlockReportReplica

java.lang.Object
org.apache.hadoop.hdfs.protocol.Block
org.apache.hadoop.hdfs.protocol.BlockListAsLongs.BlockReportReplica
All Implemented Interfaces:
Comparable<org.apache.hadoop.hdfs.protocol.Block>, Replica, org.apache.hadoop.io.Writable
Enclosing class:
BlockListAsLongs

@Private public static class BlockListAsLongs.BlockReportReplica extends org.apache.hadoop.hdfs.protocol.Block implements Replica
  • Field Summary

    Fields inherited from class org.apache.hadoop.hdfs.protocol.Block

    BLOCK_FILE_PREFIX, blockFilePattern, METADATA_EXTENSION, metaFilePattern, metaOrBlockFilePattern
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlockReportReplica(org.apache.hadoop.hdfs.protocol.Block block)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    long
    Get the number of bytes that have written to disk
    Get the replica state
    Return the storageUuid of the volume that stores this replica.
    long
    Get the number of bytes that are visible to readers
    Get the volume of replica.
    int
     
    boolean
    Return true if the target volume is backed by RAM.
    void
     

    Methods inherited from class org.apache.hadoop.hdfs.protocol.Block

    appendStringTo, compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, metaToBlockFile, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, toString, toString, write, writeId

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.hadoop.hdfs.server.datanode.Replica

    getBlockId, getGenerationStamp, getNumBytes
  • Constructor Details

    • BlockReportReplica

      public BlockReportReplica(org.apache.hadoop.hdfs.protocol.Block block)
  • Method Details

    • setState

      public void setState(HdfsServerConstants.ReplicaState state)
    • getState

      Description copied from interface: Replica
      Get the replica state
      Specified by:
      getState in interface Replica
      Returns:
      the replica state
    • getBytesOnDisk

      public long getBytesOnDisk()
      Description copied from interface: Replica
      Get the number of bytes that have written to disk
      Specified by:
      getBytesOnDisk in interface Replica
      Returns:
      the number of bytes that have written to disk
    • getVisibleLength

      public long getVisibleLength()
      Description copied from interface: Replica
      Get the number of bytes that are visible to readers
      Specified by:
      getVisibleLength in interface Replica
      Returns:
      the number of bytes that are visible to readers
    • getStorageUuid

      public String getStorageUuid()
      Description copied from interface: Replica
      Return the storageUuid of the volume that stores this replica.
      Specified by:
      getStorageUuid in interface Replica
    • isOnTransientStorage

      public boolean isOnTransientStorage()
      Description copied from interface: Replica
      Return true if the target volume is backed by RAM.
      Specified by:
      isOnTransientStorage in interface Replica
    • getVolume

      public FsVolumeSpi getVolume()
      Description copied from interface: Replica
      Get the volume of replica.
      Specified by:
      getVolume in interface Replica
      Returns:
      the volume of replica
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class org.apache.hadoop.hdfs.protocol.Block
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.apache.hadoop.hdfs.protocol.Block