Class AbstractBackgroundContainerScanner

java.lang.Object
org.apache.hadoop.ozone.container.ozoneimpl.AbstractBackgroundContainerScanner
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
BackgroundContainerDataScanner, BackgroundContainerMetadataScanner

public abstract class AbstractBackgroundContainerScanner extends Object implements Runnable
Base class for scheduled scanners on a Datanode.
  • Constructor Details

    • AbstractBackgroundContainerScanner

      public AbstractBackgroundContainerScanner(String name, long dataScanInterval)
  • Method Details

    • start

      public void start()
    • run

      public final void run()
      Specified by:
      run in interface Runnable
    • runIteration

      public final void runIteration()
    • getContainerIterator

      public abstract Iterator<Container<?>> getContainerIterator()
    • scanContainer

      public abstract void scanContainer(Container<?> c) throws IOException, InterruptedException
      Throws:
      IOException
      InterruptedException
    • handleRemainingSleep

      public final void handleRemainingSleep(long remainingSleep)
    • shutdown

      public void shutdown()
      Shutdown the current container scanning thread. If the thread is already being shutdown, the call will block until the shutdown completes.
    • isAlive

      public boolean isAlive()
    • pause

      public void pause()
    • unpause

      public void unpause()
    • getMetrics

      public abstract AbstractContainerScannerMetrics getMetrics()