Class OnDemandContainerScanner

java.lang.Object
org.apache.hadoop.ozone.container.ozoneimpl.OnDemandContainerScanner

public final class OnDemandContainerScanner extends Object
Class for performing on demand scans of containers. Note: [OPEN] containers are scanned only for metadata, [CLOSED, QUASI_CLOSED] containers are scanned for metadata and data.
  • Constructor Details

  • Method Details

    • scanContainer

      public Optional<Future<?>> scanContainer(Container<?> container, String reasonForScan)
      Triggers an on-demand scan of this container.
      Returns:
      An Optional containing a Future representing the pending scan task if the task is queued. The optional is empty if the task is not queued due to an ongoing scan.
    • scanContainerWithoutGap

      public Optional<Future<?>> scanContainerWithoutGap(Container<?> container, String reasonForScan)
      Triggers an on-demand scan of this container regardless of whether it was recently scanned.
      Returns:
      An Optional containing a Future representing the pending scan task if the task is queued. The optional is empty if the task is not queued due to an ongoing scan.
    • getMetrics

      public OnDemandScannerMetrics getMetrics()
    • shutdown

      public void shutdown()