增加Router详解-初始化

This commit is contained in:
LingZhaoHui 2024-10-13 18:36:34 +08:00
parent adba43d154
commit b344e11e16
Signed by: zeekling
GPG Key ID: D96E4E75267CA2CC

View File

@ -201,35 +201,27 @@ try {
### MembershipNamenodeResolver ### MembershipNamenodeResolver
初始化如下,主要是初始化NN缓存以及将当前注册到stateStore里面。
```java
this.stateStore = store;
this.cacheNS = new ConcurrentHashMap<>();
this.cacheBP = new ConcurrentHashMap<>();
if (this.stateStore != null) {
// Request cache updates from the state store
this.stateStore.registerCacheExternal(this);
}
```
注册到stateStore里面的逻辑比较简单
```java
public void registerCacheExternal(StateStoreCache client) {
this.cachesToUpdateExternal.add(client);
}
```
## 三、subclusterResolver
具体实现由配置项dfs.federation.router.file.resolver.client.class指定默认为MountTableResolver.class。此外还支持MultipleDestinationMountTableResolver.class
## subclusterResolver
## RPC
## adminServer
## httpServer
## NameNode Heartbeat
## Router metrics system
## quota relevant service
## Safemode
## mount table cache update
## quota manager