DirectoryScanner.ReportCompiler (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.datanode, class: DirectoryScanner, class: ReportCompiler

Package org.apache.hadoop.hdfs.server.datanode

# 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

  Constructors
  Constructor
  Description
  `ReportCompiler(FsVolumeSpi volume)`
  Create a report compiler for the given volume.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DirectoryScanner.ScanInfoVolumeReport`
  `call()`
  Run this report compiler thread.
  `void`
  `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.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ReportCompiler

    public ReportCompiler(FsVolumeSpi volume)
    Create a report compiler for the given volume.
    Parameters:
      `volume` - the target volume

- ## Method Details

  - ### call

    public DirectoryScanner.ScanInfoVolumeReport call() throws IOException
    Run this report compiler thread.
    Specified by:
      `call` in interface `Callable<DirectoryScanner.ScanInfoVolumeReport>`
    Returns:
      the block info report list
    Throws:
      `IOException` - if the block pool is not found

  - ### throttle

    public void throttle() throws InterruptedException
    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 by `DFSConfigKeys.DFS_DATANODE_DIRECTORYSCAN_THROTTLE_LIMIT_MS_PER_SEC_KEY`.
    Throws:
      `InterruptedException`