Package org.apache.hadoop.hdfs
Class LocatedBlocksRefresher
java.lang.Object
java.lang.Thread
org.apache.hadoop.util.Daemon
org.apache.hadoop.hdfs.LocatedBlocksRefresher
- All Implemented Interfaces:
Runnable
public class LocatedBlocksRefresher
extends org.apache.hadoop.util.Daemon
Periodically refresh the underlying cached
LocatedBlocks for eligible registered
DFSInputStreams. DFSInputStreams are eligible for refreshing if they have any
deadNodes or any blocks are lacking local replicas.
Disabled by default, unless an interval is configured.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.util.Daemon
org.apache.hadoop.util.Daemon.DaemonFactoryNested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInputStream(DFSInputStream dfsInputStream) longintintbooleanisInputStreamTracked(DFSInputStream dfsInputStream) voidremoveInputStream(DFSInputStream dfsInputStream) voidshutdown()Shutdown all the threads.voidwork()Methods inherited from class org.apache.hadoop.util.Daemon
getRunnable, 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, toString, yield
-
Method Details
-
work
public void work()- Overrides:
workin classorg.apache.hadoop.util.Daemon
-
getRunCount
public int getRunCount() -
getRefreshCount
public int getRefreshCount() -
shutdown
public void shutdown()Shutdown all the threads. -
addInputStream
-
removeInputStream
-
isInputStreamTracked
-
getInterval
public long getInterval()
-