| Package | Description |
|---|---|
| org.apache.hadoop.hdfs.protocol | |
| org.apache.hadoop.hdfs.server.datanode | |
| org.apache.hadoop.hdfs.server.datanode.checker |
Datanode support for running disk checks.
|
| org.apache.hadoop.hdfs.server.datanode.fsdataset | |
| org.apache.hadoop.hdfs.server.datanode.fsdataset.impl |
| Modifier and Type | Method | Description |
|---|---|---|
FsVolumeSpi |
BlockListAsLongs.BlockReportReplica.getVolume() |
| Modifier and Type | Method | Description |
|---|---|---|
FsVolumeSpi |
DirectoryScanner.ScanInfoVolumeReport.getVolume() |
|
FsVolumeSpi |
Replica.getVolume() |
Get the volume of replica.
|
FsVolumeSpi |
ReplicaInfo.getVolume() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
FaultInjectorFileIoEvents.beforeFileIo(FsVolumeSpi volume,
FileIoProvider.OPERATION op,
long len) |
|
void |
FaultInjectorFileIoEvents.beforeMetadataOp(FsVolumeSpi volume,
FileIoProvider.OPERATION op) |
|
void |
DataNode.checkDiskErrorAsync(FsVolumeSpi volume) |
Check if there is a disk failure asynchronously
and if so, handle the error.
|
boolean |
FileIoProvider.createFile(FsVolumeSpi volume,
java.io.File f) |
Create a file.
|
static java.io.File |
DatanodeUtil.createFileWithExistsCheck(FsVolumeSpi volume,
org.apache.hadoop.hdfs.protocol.Block b,
java.io.File f,
FileIoProvider fileIoProvider) |
Create a new file.
|
boolean |
FileIoProvider.delete(FsVolumeSpi volume,
java.io.File f) |
Delete a file.
|
boolean |
FileIoProvider.deleteWithExistsCheck(FsVolumeSpi volume,
java.io.File f) |
Delete a file, first checking to see if it exists.
|
static boolean |
DatanodeUtil.dirNoFilesRecursive(FsVolumeSpi volume,
java.io.File dir,
FileIoProvider fileIoProvider) |
Checks whether there are any files anywhere in the directory tree rooted
at dir (directories don't count as files).
|
void |
FileIoProvider.dirSync(FsVolumeSpi volume,
java.io.File dir) |
Sync the given directory changes to durable device.
|
boolean |
FileIoProvider.exists(FsVolumeSpi volume,
java.io.File f) |
Check for file existence using
File.exists(). |
void |
FileIoProvider.flush(FsVolumeSpi volume,
java.io.Flushable f) |
See
Flushable.flush(). |
boolean |
FileIoProvider.fullyDelete(FsVolumeSpi volume,
java.io.File dir) |
Delete the given directory using
FileUtil.fullyDelete(File). |
java.io.FileInputStream |
FileIoProvider.getFileInputStream(FsVolumeSpi volume,
java.io.File f) |
Create a FileInputStream using
FileInputStream(File). |
java.io.FileOutputStream |
FileIoProvider.getFileOutputStream(FsVolumeSpi volume,
java.io.File f) |
Create a FileOutputStream using
FileOutputStream(File, boolean). |
java.io.FileOutputStream |
FileIoProvider.getFileOutputStream(FsVolumeSpi volume,
java.io.FileDescriptor fd) |
Create a FileOutputStream using
FileOutputStream(FileDescriptor). |
java.io.FileOutputStream |
FileIoProvider.getFileOutputStream(FsVolumeSpi volume,
java.io.File f,
boolean append) |
Create a FileOutputStream using
FileOutputStream(File, boolean). |
int |
FileIoProvider.getHardLinkCount(FsVolumeSpi volume,
java.io.File f) |
Retrieves the number of links to the specified file.
|
java.io.RandomAccessFile |
FileIoProvider.getRandomAccessFile(FsVolumeSpi volume,
java.io.File f,
java.lang.String mode) |
Create a RandomAccessFile using
RandomAccessFile(File, String). |
java.io.FileInputStream |
FileIoProvider.getShareDeleteFileInputStream(FsVolumeSpi volume,
java.io.File f,
long offset) |
Create a FileInputStream using
NativeIO.getShareDeleteFileDescriptor(java.io.File, long). |
java.lang.String[] |
FileIoProvider.list(FsVolumeSpi volume,
java.io.File dir) |
Get a listing of the given directory using
FileUtil.listFiles(File). |
java.util.List<java.lang.String> |
FileIoProvider.listDirectory(FsVolumeSpi volume,
java.io.File dir,
java.io.FilenameFilter filter) |
Get a listing of the given directory using
IOUtils.listDirectory(File, FilenameFilter). |
java.io.File[] |
FileIoProvider.listFiles(FsVolumeSpi volume,
java.io.File dir) |
Get a listing of the given directory using
FileUtil.listFiles(File). |
boolean |
FileIoProvider.mkdirs(FsVolumeSpi volume,
java.io.File dir) |
See
File.mkdirs(). |
void |
FileIoProvider.mkdirsWithExistsCheck(FsVolumeSpi volume,
java.io.File dir) |
Create the target directory using
File.mkdirs() only if
it doesn't exist already. |
void |
FileIoProvider.move(FsVolumeSpi volume,
java.nio.file.Path src,
java.nio.file.Path target,
java.nio.file.CopyOption... options) |
Move the src file to the target using
Files.move(Path, Path, CopyOption...). |
void |
FileIoProvider.moveFile(FsVolumeSpi volume,
java.io.File src,
java.io.File target) |
Move the src file to the target using
FileUtils.moveFile(File, File). |
void |
FileIoProvider.nativeCopyFileUnbuffered(FsVolumeSpi volume,
java.io.File src,
java.io.File target,
boolean preserveFileDate) |
|
java.io.FileInputStream |
FileIoProvider.openAndSeek(FsVolumeSpi volume,
java.io.File f,
long offset) |
Create a FileInputStream using
FileInputStream(File) and position
it at the given offset. |
void |
FileIoProvider.posixFadvise(FsVolumeSpi volume,
java.lang.String identifier,
java.io.FileDescriptor outFd,
long offset,
long length,
int flags) |
Call posix_fadvise on the given file descriptor.
|
void |
BlockScanner.removeVolumeScanner(FsVolumeSpi volume) |
Stops and removes a volume scanner.
|
void |
FileIoProvider.rename(FsVolumeSpi volume,
java.io.File src,
java.io.File target) |
Move the src file to the target using
Storage.rename(File, File). |
void |
FileIoProvider.replaceFile(FsVolumeSpi volume,
java.io.File src,
java.io.File target) |
Move the src file to the target using
FileUtil.replaceFile(File, File). |
void |
DataNode.reportBadBlocks(org.apache.hadoop.hdfs.protocol.ExtendedBlock block,
FsVolumeSpi volume) |
Report a bad block which is hosted on the local DN.
|
ReplicaBuilder |
ReplicaBuilder.setFsVolume(FsVolumeSpi volume) |
|
void |
FileIoProvider.sync(FsVolumeSpi volume,
java.io.FileOutputStream fos) |
Sync the given
FileOutputStream. |
void |
FileIoProvider.syncFileRange(FsVolumeSpi volume,
java.io.FileDescriptor outFd,
long offset,
long numBytes,
int flags) |
Call sync_file_range on the given file descriptor.
|
void |
FileIoProvider.transferToSocketFully(FsVolumeSpi volume,
org.apache.hadoop.net.SocketOutputStream sockOut,
java.nio.channels.FileChannel fileCh,
long position,
int count,
org.apache.hadoop.io.LongWritable waitTime,
org.apache.hadoop.io.LongWritable transferTime) |
Transfer data from a FileChannel to a SocketOutputStream.
|
static void |
LocalReplica.truncateBlock(FsVolumeSpi volume,
java.io.File blockFile,
java.io.File metaFile,
long oldlen,
long newlen,
FileIoProvider fileIoProvider) |
| Constructor | Description |
|---|---|
FinalizedProvidedReplica(long blockId,
java.net.URI fileURI,
long fileOffset,
long blockLen,
long genStamp,
org.apache.hadoop.fs.PathHandle pathHandle,
FsVolumeSpi volume,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem remoteFS) |
|
FinalizedProvidedReplica(long blockId,
org.apache.hadoop.fs.Path pathPrefix,
java.lang.String pathSuffix,
long fileOffset,
long blockLen,
long genStamp,
org.apache.hadoop.fs.PathHandle pathHandle,
FsVolumeSpi volume,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem remoteFS) |
|
FinalizedProvidedReplica(FileRegion fileRegion,
FsVolumeSpi volume,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem remoteFS) |
|
FinalizedReplica(long blockId,
long len,
long genStamp,
FsVolumeSpi vol,
java.io.File dir) |
Constructor.
|
FinalizedReplica(long blockId,
long len,
long genStamp,
FsVolumeSpi vol,
java.io.File dir,
byte[] checksum) |
Constructor.
|
FinalizedReplica(org.apache.hadoop.hdfs.protocol.Block block,
FsVolumeSpi vol,
java.io.File dir) |
Constructor
|
FinalizedReplica(org.apache.hadoop.hdfs.protocol.Block block,
FsVolumeSpi vol,
java.io.File dir,
byte[] checksum) |
Constructor
|
LocalReplicaInPipeline(long blockId,
long genStamp,
FsVolumeSpi vol,
java.io.File dir,
long bytesToReserve) |
Constructor for a zero length replica.
|
ProvidedReplica(long blockId,
java.net.URI fileURI,
long fileOffset,
long blockLen,
long genStamp,
org.apache.hadoop.fs.PathHandle pathHandle,
FsVolumeSpi volume,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem remoteFS) |
Constructor.
|
ProvidedReplica(long blockId,
org.apache.hadoop.fs.Path pathPrefix,
java.lang.String pathSuffix,
long fileOffset,
long blockLen,
long genStamp,
org.apache.hadoop.fs.PathHandle pathHandle,
FsVolumeSpi volume,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem remoteFS) |
Constructor.
|
ReplicaBeingWritten(long blockId,
long len,
long genStamp,
FsVolumeSpi vol,
java.io.File dir,
java.lang.Thread writer,
long bytesToReserve) |
Constructor.
|
ReplicaBeingWritten(long blockId,
long genStamp,
FsVolumeSpi vol,
java.io.File dir,
long bytesToReserve) |
Constructor for a zero length replica.
|
ReplicaBeingWritten(org.apache.hadoop.hdfs.protocol.Block block,
FsVolumeSpi vol,
java.io.File dir,
java.lang.Thread writer) |
Constructor.
|
ReplicaWaitingToBeRecovered(long blockId,
long len,
long genStamp,
FsVolumeSpi vol,
java.io.File dir) |
Constructor
|
ReplicaWaitingToBeRecovered(org.apache.hadoop.hdfs.protocol.Block block,
FsVolumeSpi vol,
java.io.File dir) |
Constructor
|
ReportCompiler(FsVolumeSpi volume) |
Create a report compiler for the given volume.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.Set<FsVolumeSpi> |
DatasetVolumeChecker.checkAllVolumes(FsDatasetSpi<? extends FsVolumeSpi> dataset) |
Run checks against all volumes of a dataset.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
DatasetVolumeChecker.checkVolume(FsVolumeSpi volume,
DatasetVolumeChecker.Callback callback) |
Check a single volume asynchronously, returning a
ListenableFuture
that can be used to retrieve the final result. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
DatasetVolumeChecker.Callback.call(java.util.Set<FsVolumeSpi> healthyVolumes,
java.util.Set<FsVolumeSpi> failedVolumes) |
|
java.util.Set<FsVolumeSpi> |
DatasetVolumeChecker.checkAllVolumes(FsDatasetSpi<? extends FsVolumeSpi> dataset) |
Run checks against all volumes of a dataset.
|
| Modifier and Type | Class | Description |
|---|---|---|
class |
AvailableSpaceVolumeChoosingPolicy<V extends FsVolumeSpi> |
A DN volume choosing policy which takes into account the amount of free
space on each of the available volumes when considering where to assign a
new replica allocation.
|
interface |
FsDatasetSpi<V extends FsVolumeSpi> |
This is a service provider interface for the underlying storage that
stores replicas for a data node.
|
class |
RoundRobinVolumeChoosingPolicy<V extends FsVolumeSpi> |
Choose volumes with the same storage type in round-robin order.
|
interface |
VolumeChoosingPolicy<V extends FsVolumeSpi> |
This interface specifies the policy for choosing volumes to store replicas.
|
| Modifier and Type | Method | Description |
|---|---|---|
FsVolumeSpi |
FsDatasetSpi.FsVolumeReferences.get(int index) |
Get the volume for a given index.
|
FsVolumeSpi |
FsVolumeReference.getVolume() |
Returns the underlying volume object.
|
FsVolumeSpi |
FsVolumeSpi.ScanInfo.getVolume() |
Returns the volume that contains the block that this object describes.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.Iterator<FsVolumeSpi> |
FsDatasetSpi.FsVolumeReferences.iterator() |
| Modifier and Type | Method | Description |
|---|---|---|
ReplicaInfo |
FsDatasetSpi.moveBlockAcrossVolumes(org.apache.hadoop.hdfs.protocol.ExtendedBlock block,
FsVolumeSpi destination) |
Moves a given block from one volume to another volume.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
FsDatasetSpi.handleVolumeFailures(java.util.Set<FsVolumeSpi> failedVolumes) |
Check if all the data directories are healthy
|
| Constructor | Description |
|---|---|
ReplicaOutputStreams(java.io.OutputStream dataOut,
java.io.OutputStream checksumOut,
org.apache.hadoop.util.DataChecksum checksum,
FsVolumeSpi volume,
FileIoProvider fileIoProvider) |
Create an object with a data output stream, a checksum output stream
and a checksum.
|
ScanInfo(long blockId,
java.io.File basePath,
java.lang.String blockFile,
java.lang.String metaFile,
FsVolumeSpi vol) |
Create a ScanInfo object for a block.
|
ScanInfo(long blockId,
FsVolumeSpi vol,
FileRegion fileRegion,
long length) |
Create a ScanInfo object for a block.
|
| Modifier and Type | Class | Description |
|---|---|---|
class |
FsVolumeImpl |
The underlying volume used to store replica.
|
| Modifier and Type | Method | Description |
|---|---|---|
FsDatasetSpi<? extends FsVolumeSpi> |
FsVolumeImpl.getDataset() |
|
java.util.Map<FsVolumeSpi,java.io.IOException> |
AddBlockPoolException.getFailingVolumes() |
| Constructor | Description |
|---|---|
AddBlockPoolException(java.util.Map<FsVolumeSpi,java.io.IOException> unhealthyDataDirs) |
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.