@InterfaceAudience.Private public abstract class ReplicaInfo extends Block implements Replica
Modifier and Type | Class and Description |
---|---|
static class |
ReplicaInfo.ReplicaDirInfo |
BLOCK_FILE_PREFIX, blockFilePattern, METADATA_EXTENSION, metaFilePattern
Modifier and Type | Method and Description |
---|---|
File |
getBlockFile()
Get the full path of this replica's data file
|
File |
getMetaFile()
Get the full path of this replica's meta file
|
FsVolumeSpi |
getVolume()
Get the volume where this replica is located on disk
|
boolean |
isUnlinked()
check if this replica has already been unlinked.
|
static ReplicaInfo.ReplicaDirInfo |
parseSubDirs(File dir) |
void |
setDir(File dir)
Set the parent directory where this replica is located
|
void |
setUnlinked()
set that this replica is unlinked
|
String |
toString() |
boolean |
unlinkBlock(int numLinks)
Remove a hard link by copying the block to a temporary place and
then moving it back
|
appendStringTo, compareTo, equals, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, hashCode, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, write, writeId
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getBlockId, getBytesOnDisk, getGenerationStamp, getNumBytes, getState, getVisibleLength
public File getBlockFile()
public File getMetaFile()
public FsVolumeSpi getVolume()
public void setDir(File dir)
dir
- the parent directory where the replica is locatedpublic static ReplicaInfo.ReplicaDirInfo parseSubDirs(File dir)
public boolean isUnlinked()
public void setUnlinked()
public boolean unlinkBlock(int numLinks) throws IOException
numLinks
- number of hard linksIOException
- if there is any copy errorCopyright © 2013 Apache Software Foundation. All rights reserved.