java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.service.Servicepublic class MountTableRefresherService
extends org.apache.hadoop.service.AbstractService
MountTableStore when there is change in
mount table entries and it updates mount table entry cache on local router as
well as on all remote routers. Refresh on local router is done by calling
CachedRecordStore.loadCache(boolean)} API directly, no RPC call
involved, but on remote routers refresh is done through RouterClient(RPC
call). To improve performance, all routers are refreshed in separate thread
and all connection are cached. Cached connections are removed from
cache and closed when their max live time is elapsed.| Constructor | Description |
|---|---|
MountTableRefresherService(Router router) |
Create a new service to refresh mount table cache when there is change in
mount table entries.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
closeRouterClient(RouterClient client) |
|
protected RouterClient |
createRouterClient(java.net.InetSocketAddress routerSocket,
org.apache.hadoop.conf.Configuration config) |
|
protected MountTableRefresherThread |
getLocalRefresher(java.lang.String adminAddress) |
|
void |
refresh() |
Refresh mount table cache of this router as well as all other routers.
|
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
|
protected void |
serviceStart() |
|
protected void |
serviceStop() |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic MountTableRefresherService(Router router)
router - whose mount table cache will be refreshedprotected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws java.lang.Exception
serviceInit in class org.apache.hadoop.service.AbstractServicejava.lang.Exception@VisibleForTesting protected void closeRouterClient(RouterClient client)
@VisibleForTesting protected RouterClient createRouterClient(java.net.InetSocketAddress routerSocket, org.apache.hadoop.conf.Configuration config) throws java.io.IOException
java.io.IOExceptionprotected void serviceStart()
throws java.lang.Exception
serviceStart in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected void serviceStop()
throws java.lang.Exception
serviceStop in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionpublic void refresh()
throws StateStoreUnavailableException
StateStoreUnavailableException - if the state store is not available.@VisibleForTesting protected MountTableRefresherThread getLocalRefresher(java.lang.String adminAddress)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.