java.lang.Comparable<org.apache.hadoop.hdfs.protocol.Block>, Replica, ReplicaInPipeline, org.apache.hadoop.io.Writable, org.apache.hadoop.util.LightWeightGSet.LinkedElementpublic class ReplicaBeingWritten extends LocalReplicaInPipeline
LocalReplica.ReplicaDirInfo| Constructor | Description |
|---|---|
ReplicaBeingWritten(long blockId,
long len,
long genStamp,
FsVolumeSpi vol,
java.io.File dir,
java.lang.Thread writer,
long bytesToReserve) |
Constructor.
|
ReplicaBeingWritten(long blockId,
long genStamp,
FsVolumeSpi vol,
java.io.File dir,
long bytesToReserve) |
Constructor for a zero length replica.
|
ReplicaBeingWritten(org.apache.hadoop.hdfs.protocol.Block block,
FsVolumeSpi vol,
java.io.File dir,
java.lang.Thread writer) |
Constructor.
|
ReplicaBeingWritten(ReplicaBeingWritten from) |
Copy constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object o) |
|
HdfsServerConstants.ReplicaState |
getState() |
Get the replica state
|
long |
getVisibleLength() |
Get the number of bytes that are visible to readers
|
int |
hashCode() |
attemptToSetWriter, createInfo, createRestartMetaStream, createStreams, getBytesAcked, getBytesOnDisk, getBytesReserved, getLastChecksumAndDataLen, getOriginalBytesReserved, getOriginalReplica, getRecoveryID, getReplicaInfo, interruptThread, moveReplicaFrom, releaseAllBytesReserved, releaseReplicaInfoBytesReserved, setBytesAcked, setLastChecksumAndDataLen, setRecoveryID, setWriter, stopWriter, toString, waitForMinLengthblockDataExists, breakHardLinksIfNeeded, bumpReplicaGS, compareWith, copyBlockdata, copyMetadata, deleteBlockData, deleteMetadata, fsyncDirectory, getBlockDataLength, getBlockFile, getBlockURI, getDataInputStream, getDataOutputStream, getDir, getMetadataInputStream, getMetadataLength, getMetadataOutputStream, getMetadataURI, getMetaFile, getPinning, getPinning, metadataExists, parseBaseDir, renameData, renameMeta, setPinning, setPinning, truncateBlock, truncateBlock, updateWithReplicagetFileIoProvider, getNext, getStorageUuid, getVolume, isOnTransientStorage, setNextappendStringTo, compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, metaToBlockFile, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, toString, write, writeIdclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBlockId, getGenerationStamp, getNumBytes, getStorageUuid, getVolume, isOnTransientStoragesetNumBytespublic ReplicaBeingWritten(long blockId,
long genStamp,
FsVolumeSpi vol,
java.io.File dir,
long bytesToReserve)
blockId - block idgenStamp - replica generation stampvol - volume where replica is locateddir - directory path where block and meta files are locatedbytesToReserve - disk space to reserve for this replica, based on
the estimated maximum block length.public ReplicaBeingWritten(org.apache.hadoop.hdfs.protocol.Block block,
FsVolumeSpi vol,
java.io.File dir,
java.lang.Thread writer)
block - a blockvol - volume where replica is locateddir - directory path where block and meta files are locatedwriter - a thread that is writing to this replicapublic ReplicaBeingWritten(long blockId,
long len,
long genStamp,
FsVolumeSpi vol,
java.io.File dir,
java.lang.Thread writer,
long bytesToReserve)
blockId - block idlen - replica lengthgenStamp - replica generation stampvol - volume where replica is locateddir - directory path where block and meta files are locatedwriter - a thread that is writing to this replicabytesToReserve - disk space to reserve for this replica, based on
the estimated maximum block length.public ReplicaBeingWritten(ReplicaBeingWritten from)
from - where to copy frompublic long getVisibleLength()
ReplicagetVisibleLength in interface ReplicagetVisibleLength in class LocalReplicaInPipelinepublic HdfsServerConstants.ReplicaState getState()
ReplicagetState in interface ReplicagetState in class LocalReplicaInPipelinepublic boolean equals(java.lang.Object o)
equals in class LocalReplicaInPipelinepublic int hashCode()
hashCode in class LocalReplicaInPipelineCopyright © 2008–2025 Apache Software Foundation. All rights reserved.