public interface FsVolumeSpi
| Modifier and Type | Interface and Description |
|---|---|
static interface |
FsVolumeSpi.BlockIterator
BlockIterator will return ExtendedBlock entries from a block pool in
this volume.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getAvailable() |
String |
getBasePath() |
String[] |
getBlockPoolList() |
org.apache.hadoop.hdfs.server.datanode.fsdataset.FsDatasetSpi |
getDataset()
Get the FSDatasetSpi which this volume is a part of.
|
File |
getFinalizedDir(String bpid) |
String |
getPath(String bpid) |
String |
getStorageID() |
StorageType |
getStorageType() |
boolean |
isTransientStorage()
Returns true if the volume is NOT backed by persistent storage.
|
FsVolumeSpi.BlockIterator |
loadBlockIterator(String bpid,
String name)
Load a saved block iterator.
|
byte[] |
loadLastPartialChunkChecksum(File blockFile,
File metaFile)
Load last partial chunk checksum from checksum file.
|
FsVolumeSpi.BlockIterator |
newBlockIterator(String bpid,
String name)
Create a new block iterator.
|
FsVolumeReference |
obtainReference()
Obtain a reference object that had increased 1 reference count of the
volume.
|
void |
releaseReservedSpace(long bytesToRelease)
Release disk space previously reserved for RBW block.
|
void |
reserveSpaceForRbw(long bytesToReserve)
Reserve disk space for an RBW block so a writer does not run out of
space before the block is full.
|
FsVolumeReference obtainReference() throws ClosedChannelException
FsVolumeReference to decrease
the reference count on the volume.ClosedChannelExceptionString getStorageID()
String[] getBlockPoolList()
long getAvailable() throws IOException
IOExceptionString getBasePath()
String getPath(String bpid) throws IOException
IOExceptionFile getFinalizedDir(String bpid) throws IOException
IOExceptionStorageType getStorageType()
void reserveSpaceForRbw(long bytesToReserve)
void releaseReservedSpace(long bytesToRelease)
boolean isTransientStorage()
FsVolumeSpi.BlockIterator newBlockIterator(String bpid, String name)
bpid - The block pool id to iterate over.name - The name of the block iterator to create.FsVolumeSpi.BlockIterator loadBlockIterator(String bpid, String name) throws IOException
bpid - The block pool id to iterate over.name - The name of the block iterator to load.IOException - If there was an IO error loading the saved
block iterator.org.apache.hadoop.hdfs.server.datanode.fsdataset.FsDatasetSpi getDataset()
byte[] loadLastPartialChunkChecksum(File blockFile, File metaFile) throws IOException
blockFile - metaFile - IOExceptionCopyright © 2018 CERN. All Rights Reserved.