Class ReplicaBeingWritten

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

public class ReplicaBeingWritten extends LocalReplicaInPipeline
This class represents replicas being written. Those are the replicas that are created in a pipeline initiated by a dfs client.
  • Constructor Details

    • ReplicaBeingWritten

      public ReplicaBeingWritten(long blockId, long genStamp, FsVolumeSpi vol, File dir, long bytesToReserve)
      Constructor for a zero length replica.
      Parameters:
      blockId - block id
      genStamp - replica generation stamp
      vol - volume where replica is located
      dir - directory path where block and meta files are located
      bytesToReserve - disk space to reserve for this replica, based on the estimated maximum block length.
    • ReplicaBeingWritten

      public ReplicaBeingWritten(org.apache.hadoop.hdfs.protocol.Block block, FsVolumeSpi vol, File dir, Thread writer)
      Constructor.
      Parameters:
      block - a block
      vol - volume where replica is located
      dir - directory path where block and meta files are located
      writer - a thread that is writing to this replica
    • ReplicaBeingWritten

      public ReplicaBeingWritten(long blockId, long len, long genStamp, FsVolumeSpi vol, File dir, Thread writer, long bytesToReserve)
      Constructor.
      Parameters:
      blockId - block id
      len - replica length
      genStamp - replica generation stamp
      vol - volume where replica is located
      dir - directory path where block and meta files are located
      writer - a thread that is writing to this replica
      bytesToReserve - disk space to reserve for this replica, based on the estimated maximum block length.
    • ReplicaBeingWritten

      public ReplicaBeingWritten(ReplicaBeingWritten from)
      Copy constructor.
      Parameters:
      from - where to copy from
  • Method Details