public class ReplicaBeingWritten extends ReplicaInPipeline
ReplicaInfo.ReplicaDirInfo
BLOCK_FILE_PREFIX, blockFilePattern, METADATA_EXTENSION, metaFilePattern
Constructor and Description |
---|
ReplicaBeingWritten(Block block,
FsVolumeSpi vol,
File dir,
Thread writer)
Constructor
|
ReplicaBeingWritten(long blockId,
long genStamp,
FsVolumeSpi vol,
File dir)
Constructor for a zero length replica
|
ReplicaBeingWritten(long blockId,
long len,
long genStamp,
FsVolumeSpi vol,
File dir,
Thread writer)
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() |
createStreams, getBytesAcked, getBytesOnDisk, getLastChecksumAndDataLen, setBytesAcked, setLastChecksumAndDataLen, setWriter, stopWriter, toString
getBlockFile, getMetaFile, getVolume, isUnlinked, parseSubDirs, setDir, setUnlinked, unlinkBlock
appendStringTo, compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, write, writeId
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
setNumBytes
getBlockId, getGenerationStamp, getNumBytes
public ReplicaBeingWritten(long blockId, long genStamp, FsVolumeSpi vol, File dir)
blockId
- block idgenStamp
- replica generation stampvol
- volume where replica is locateddir
- directory path where block and meta files are locatedpublic ReplicaBeingWritten(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)
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 replicapublic ReplicaBeingWritten(ReplicaBeingWritten from)
from
- public long getVisibleLength()
Replica
getVisibleLength
in interface Replica
getVisibleLength
in class ReplicaInPipeline
public HdfsServerConstants.ReplicaState getState()
Replica
getState
in interface Replica
getState
in class ReplicaInPipeline
public boolean equals(Object o)
equals
in class ReplicaInPipeline
public int hashCode()
hashCode
in class ReplicaInPipeline
Copyright © 2013 Apache Software Foundation. All rights reserved.