public class ReplicaBeingWritten extends ReplicaInPipeline
ReplicaInfo.ReplicaDirInfo
Constructor and Description |
---|
ReplicaBeingWritten(org.apache.hadoop.hdfs.protocol.Block block,
FsVolumeSpi vol,
File dir,
Thread writer)
Constructor
|
ReplicaBeingWritten(long blockId,
long genStamp,
FsVolumeSpi vol,
File dir,
long bytesToReserve)
Constructor for a zero length replica
|
ReplicaBeingWritten(long blockId,
long len,
long genStamp,
FsVolumeSpi vol,
File dir,
Thread writer,
long bytesToReserve)
Constructor
|
ReplicaBeingWritten(ReplicaBeingWritten from)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
HdfsServerConstants.ReplicaState |
getState()
Get the replica state
|
long |
getVisibleLength()
Get the number of bytes that are visible to readers
|
int |
hashCode() |
attemptToSetWriter, createRestartMetaStream, createStreams, getBytesAcked, getBytesOnDisk, getBytesReserved, getLastChecksumAndDataLen, getOriginalBytesReserved, interruptThread, releaseAllBytesReserved, setBytesAcked, setLastChecksumAndDataLen, stopWriter, toString
breakHardLinksIfNeeded, getBlockFile, getMetaFile, getNext, getStorageUuid, getVolume, isOnTransientStorage, parseBaseDir, setDir, setNext
appendStringTo, compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, metaToBlockFile, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, toString, write, writeId
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
setNumBytes
public ReplicaBeingWritten(long blockId, long genStamp, FsVolumeSpi vol, 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, File dir, 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, File dir, 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()
org.apache.hadoop.hdfs.server.datanode.Replica
getVisibleLength
in interface org.apache.hadoop.hdfs.server.datanode.Replica
getVisibleLength
in class ReplicaInPipeline
public HdfsServerConstants.ReplicaState getState()
org.apache.hadoop.hdfs.server.datanode.Replica
getState
in interface org.apache.hadoop.hdfs.server.datanode.Replica
getState
in class ReplicaInPipeline
public boolean equals(Object o)
equals
in class ReplicaInPipeline
public int hashCode()
hashCode
in class ReplicaInPipeline
Copyright © 2017 Apache Software Foundation. All Rights Reserved.