BlockListAsLongs.BlockReportReplica (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.protocol, class: BlockListAsLongs, class: BlockReportReplica

Package org.apache.hadoop.hdfs.protocol

# 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`
  `equals(Object o)`
  `long`
  `getBytesOnDisk()`
  Get the number of bytes that have written to disk
  `HdfsServerConstants.ReplicaState`
  `getState()`
  Get the replica state
  `String`
  `getStorageUuid()`
  Return the storageUuid of the volume that stores this replica.
  `long`
  `getVisibleLength()`
  Get the number of bytes that are visible to readers
  `FsVolumeSpi`
  `getVolume()`
  Get the volume of replica.
  `int`
  `hashCode()`
  `boolean`
  `isOnTransientStorage()`
  Return true if the target volume is backed by RAM.
  `void`
  `setState(HdfsServerConstants.ReplicaState state)`

  ### 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

    public HdfsServerConstants.ReplicaState 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`