Class AbstractBackgroundContainerScanner
java.lang.Object
org.apache.hadoop.ozone.container.ozoneimpl.AbstractBackgroundContainerScanner
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
BackgroundContainerDataScanner,BackgroundContainerMetadataScanner
Base class for scheduled scanners on a Datanode.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract AbstractContainerScannerMetricsfinal voidhandleRemainingSleep(long remainingSleep) booleanisAlive()voidpause()final voidrun()final voidabstract voidscanContainer(Container<?> c) voidshutdown()Shutdown the current container scanning thread.voidstart()voidunpause()
-
Constructor Details
-
AbstractBackgroundContainerScanner
-
-
Method Details
-
start
public void start() -
run
public final void run() -
runIteration
public final void runIteration() -
getContainerIterator
-
scanContainer
- Throws:
IOExceptionInterruptedException
-
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
-