Checkable<FsVolumeSpi.VolumeCheckContext,VolumeCheckResult>FsVolumeImplpublic interface FsVolumeSpi extends Checkable<FsVolumeSpi.VolumeCheckContext,VolumeCheckResult>
| Modifier and Type | Interface | Description |
|---|---|---|
static interface |
FsVolumeSpi.BlockIterator |
BlockIterator will return ExtendedBlock entries from a block pool in
this volume.
|
static class |
FsVolumeSpi.ScanInfo |
Tracks the files and other information related to a block on the disk
Missing file is indicated by setting the corresponding member
to null.
|
static class |
FsVolumeSpi.VolumeCheckContext |
Context for the
Checkable.check(K) call. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
compileReport(java.lang.String bpid,
java.util.Collection<FsVolumeSpi.ScanInfo> report,
DirectoryScanner.ReportCompiler reportCompiler) |
Compile a list of
FsVolumeSpi.ScanInfo for the blocks in
the block pool with id bpid. |
long |
getAvailable() |
|
java.net.URI |
getBaseURI() |
|
java.lang.String[] |
getBlockPoolList() |
|
FsDatasetSpi |
getDataset() |
Get the FSDatasetSpi which this volume is a part of.
|
FileIoProvider |
getFileIoProvider() |
|
DataNodeVolumeMetrics |
getMetrics() |
|
java.lang.String |
getStorageID() |
|
StorageLocation |
getStorageLocation() |
|
org.apache.hadoop.fs.StorageType |
getStorageType() |
|
org.apache.hadoop.fs.DF |
getUsageStats(org.apache.hadoop.conf.Configuration conf) |
|
boolean |
isRAMStorage() |
Returns true if the volume is backed by RAM storage.
|
boolean |
isTransientStorage() |
Returns true if the volume is NOT backed by persistent storage.
|
FsVolumeSpi.BlockIterator |
loadBlockIterator(java.lang.String bpid,
java.lang.String name) |
Load a saved block iterator.
|
byte[] |
loadLastPartialChunkChecksum(java.io.File blockFile,
java.io.File metaFile) |
Load last partial chunk checksum from checksum file.
|
FsVolumeSpi.BlockIterator |
newBlockIterator(java.lang.String bpid,
java.lang.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 java.nio.channels.ClosedChannelException
FsVolumeReference to decrease
the reference count on the volume.java.nio.channels.ClosedChannelExceptionjava.lang.String getStorageID()
java.lang.String[] getBlockPoolList()
long getAvailable()
throws java.io.IOException
java.io.IOExceptionjava.net.URI getBaseURI()
org.apache.hadoop.fs.DF getUsageStats(org.apache.hadoop.conf.Configuration conf)
StorageLocation getStorageLocation()
StorageLocation to the volumeorg.apache.hadoop.fs.StorageType getStorageType()
StorageType of the volumeboolean isTransientStorage()
boolean isRAMStorage()
void reserveSpaceForReplica(long bytesToReserve)
void releaseReservedSpace(long bytesToRelease)
void releaseLockedMemory(long bytesToRelease)
FsVolumeSpi.BlockIterator newBlockIterator(java.lang.String bpid, java.lang.String name)
bpid - The block pool id to iterate over.name - The name of the block iterator to create.FsVolumeSpi.BlockIterator loadBlockIterator(java.lang.String bpid, java.lang.String name) throws java.io.IOException
bpid - The block pool id to iterate over.name - The name of the block iterator to load.java.io.IOException - If there was an IO error loading the saved
block iterator.FsDatasetSpi getDataset()
byte[] loadLastPartialChunkChecksum(java.io.File blockFile,
java.io.File metaFile)
throws java.io.IOException
blockFile - metaFile - java.io.IOExceptionvoid compileReport(java.lang.String bpid,
java.util.Collection<FsVolumeSpi.ScanInfo> report,
DirectoryScanner.ReportCompiler reportCompiler)
throws java.lang.InterruptedException,
java.io.IOException
FsVolumeSpi.ScanInfo for the blocks in
the block pool with id bpid.bpid - block pool id to scanreport - the list onto which blocks reports are placedreportCompiler - java.lang.InterruptedExceptionjava.io.IOExceptionFileIoProvider getFileIoProvider()
DataNodeVolumeMetrics getMetrics()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.