Class MountTableRefresherThread
java.lang.Object
java.lang.Thread
org.apache.hadoop.util.concurrent.SubjectInheritingThread
org.apache.hadoop.hdfs.server.federation.router.MountTableRefresherThread
- All Implemented Interfaces:
Runnable
public class MountTableRefresherThread
extends org.apache.hadoop.util.concurrent.SubjectInheritingThread
Base class for updating mount table cache on all the router.
-
Nested Class Summary
Nested 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidsetCountDownLatch(CountDownLatch countDownLatch) toString()voidwork()Refresh mount table cache of local and remote routers.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
-
Constructor Details
-
MountTableRefresherThread
-
-
Method Details
-
work
public void work()Refresh mount table cache of local and remote routers. Local and remote routers will be refreshed differently. Let's understand what are the local and remote routers and refresh will be done differently on these routers. Suppose there are three routers R1, R2 and R3. User want to add new mount table entry. He will connect to only one router, not all the routers. Suppose He connects to R1 and calls add mount table entry through API or CLI. Now in this context R1 is local router, R2 and R3 are remote routers. Because add mount table entry is invoked on R1, R1 will update the cache locally it need not make RPC call. But R1 will make RPC calls to update cache on R2 and R3.- Overrides:
workin classorg.apache.hadoop.util.concurrent.SubjectInheritingThread
-
isSuccess
public boolean isSuccess()- Returns:
- true if cache was refreshed successfully.
-
setCountDownLatch
-
toString
-
getAdminAddress
-