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.
  • Constructor Details

  • 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:
      work in class org.apache.hadoop.util.concurrent.SubjectInheritingThread
    • isSuccess

      public boolean isSuccess()
      Returns:
      true if cache was refreshed successfully.
    • setCountDownLatch

      public void setCountDownLatch(CountDownLatch countDownLatch)
    • toString

      public String toString()
      Overrides:
      toString in class Thread
    • getAdminAddress

      public String getAdminAddress()