Class VolumeScanner
java.lang.Object
java.lang.Thread
org.apache.hadoop.util.concurrent.SubjectInheritingThread
org.apache.hadoop.hdfs.server.datanode.VolumeScanner
- All Implemented Interfaces:
Runnable
public class VolumeScanner
extends org.apache.hadoop.util.concurrent.SubjectInheritingThread
VolumeScanner scans a single volume. Each VolumeScanner has its own thread.
They are all managed by the DataNode's BlockScanner.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Method Summary
Modifier and TypeMethodDescriptionvoiddisableBlockPoolId(String bpid) Disallow the scanner from scanning the given block pool.voidenableBlockPoolId(String bpid) Allow the scanner to scan the given block pool.voidmarkSuspectBlock(org.apache.hadoop.hdfs.protocol.ExtendedBlock block) voidvoidshutdown()Shut down this scanner.toString()voidwork()Methods inherited from class org.apache.hadoop.util.concurrent.SubjectInheritingThread
run, startMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, suspend, yield
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG
-
-
Method Details
-
printStats
-
work
public void work()- Overrides:
workin classorg.apache.hadoop.util.concurrent.SubjectInheritingThread
-
toString
-
shutdown
public void shutdown()Shut down this scanner. -
markSuspectBlock
public void markSuspectBlock(org.apache.hadoop.hdfs.protocol.ExtendedBlock block) -
enableBlockPoolId
Allow the scanner to scan the given block pool.- Parameters:
bpid- The block pool id.
-
disableBlockPoolId
Disallow the scanner from scanning the given block pool.- Parameters:
bpid- The block pool id.
-