Class FinalizedProvidedReplica

java.lang.Object
org.apache.hadoop.hdfs.protocol.Block
All Implemented Interfaces:
Comparable<org.apache.hadoop.hdfs.protocol.Block>, Replica, org.apache.hadoop.io.Writable, org.apache.hadoop.util.LightWeightGSet.LinkedElement

@Private @Unstable public class FinalizedProvidedReplica extends ProvidedReplica
This class is used for provided replicas that are finalized.
  • Constructor Details

    • FinalizedProvidedReplica

      public FinalizedProvidedReplica(long blockId, URI fileURI, long fileOffset, long blockLen, long genStamp, org.apache.hadoop.fs.PathHandle pathHandle, FsVolumeSpi volume, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem remoteFS)
    • FinalizedProvidedReplica

      public FinalizedProvidedReplica(FileRegion fileRegion, FsVolumeSpi volume, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem remoteFS)
    • FinalizedProvidedReplica

      public FinalizedProvidedReplica(long blockId, org.apache.hadoop.fs.Path pathPrefix, String pathSuffix, long fileOffset, long blockLen, long genStamp, org.apache.hadoop.fs.PathHandle pathHandle, FsVolumeSpi volume, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem remoteFS)
  • Method Details

    • getState

      Description copied from interface: Replica
      Get the replica state
      Returns:
      the replica state
    • getBytesOnDisk

      public long getBytesOnDisk()
      Description copied from interface: Replica
      Get the number of bytes that have written to disk
      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
      Returns:
      the number of bytes that are visible to readers
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class ReplicaInfo
    • getOriginalReplica

      public ReplicaInfo getOriginalReplica()
      Specified by:
      getOriginalReplica in class ReplicaInfo
    • getRecoveryID

      public long getRecoveryID()
      Description copied from class: ReplicaInfo
      Get the recovery id.
      Specified by:
      getRecoveryID in class ReplicaInfo
      Returns:
      the generation stamp that the replica will be bumped to
    • setRecoveryID

      public void setRecoveryID(long recoveryId)
      Description copied from class: ReplicaInfo
      Set the recovery id.
      Specified by:
      setRecoveryID in class ReplicaInfo
      Parameters:
      recoveryId - the new recoveryId
    • createInfo

      public ReplicaRecoveryInfo createInfo()
      Overrides:
      createInfo in class ProvidedReplica