Class DirectoryScanner.ReportCompiler
java.lang.Object
org.apache.hadoop.hdfs.server.datanode.DirectoryScanner.ReportCompiler
- All Implemented Interfaces:
Callable<DirectoryScanner.ScanInfoVolumeReport>
- Enclosing class:
- DirectoryScanner
public class DirectoryScanner.ReportCompiler
extends Object
implements Callable<DirectoryScanner.ScanInfoVolumeReport>
The ReportCompiler class encapsulates the process of searching a datanode's
disks for block information. It operates by performing a DFS of the volume
to discover block information.
When the ReportCompiler discovers block information, it create a new
ScanInfo object for it and adds that object to its report list. The report
list is returned by the
call() method.-
Constructor Summary
ConstructorsConstructorDescriptionReportCompiler(FsVolumeSpi volume) Create a report compiler for the given volume. -
Method Summary
-
Constructor Details
-
ReportCompiler
Create a report compiler for the given volume.- Parameters:
volume- the target volume
-
-
Method Details
-
call
Run this report compiler thread.- Specified by:
callin interfaceCallable<DirectoryScanner.ScanInfoVolumeReport>- Returns:
- the block info report list
- Throws:
IOException- if the block pool is not found
-
throttle
Called by the thread before each potential disk scan so that a pause can be optionally inserted to limit the number of scans per second. The limit is controlled byDFSConfigKeys.DFS_DATANODE_DIRECTORYSCAN_THROTTLE_LIMIT_MS_PER_SEC_KEY.- Throws:
InterruptedException
-