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() |
org.apache.hadoop.fs.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 |
releaseLockedMemory(long bytesToRelease)
Release reserved memory for an RBW block written to transient storage
i.e.
|
void |
releaseReservedSpace(long bytesToRelease)
Release disk space previously reserved for block opened for write.
|
void |
reserveSpaceForReplica(long bytesToReserve)
Reserve disk space for a block (RBW or Re-replicating)
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.ClosedChannelException
String getStorageID()
String[] getBlockPoolList()
long getAvailable() throws IOException
IOException
String getBasePath()
String getPath(String bpid) throws IOException
IOException
File getFinalizedDir(String bpid) throws IOException
IOException
org.apache.hadoop.fs.StorageType getStorageType()
boolean isTransientStorage()
void reserveSpaceForReplica(long bytesToReserve)
void releaseReservedSpace(long bytesToRelease)
void releaseLockedMemory(long bytesToRelease)
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
- IOException
Copyright © 2017 Apache Software Foundation. All Rights Reserved.