Class RouterResolver<K,V>
java.lang.Object
org.apache.hadoop.hdfs.server.federation.resolver.order.RouterResolver<K,V>
- Type Parameters:
K- The key type of subcluster mapping info queried from Router.V- The value type of subcluster mapping info queried from Router.
- All Implemented Interfaces:
OrderedResolver
- Direct Known Subclasses:
AvailableSpaceResolver,LocalResolver
The order resolver that depends upon the Router service.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConfiguration key to set the minimum time to update subcluster info. -
Constructor Summary
ConstructorsConstructorDescriptionRouterResolver(org.apache.hadoop.conf.Configuration conf, Router routerService) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringchooseFirstNamespace(String path, PathLocation loc) Choose the first namespace from queried subcluster mapping info.getFirstNamespace(String path, PathLocation loc) Get the first namespace based on this resolver approach.protected MembershipStoreGet the Membership store.protected RouterRpcServerGet the Router RPC server.getSubclusterInfo(MembershipStore membershipStore) The implementation for getting desired subcluster mapping info.Get subcluster mapping info.
-
Field Details
-
MIN_UPDATE_PERIOD_KEY
Configuration key to set the minimum time to update subcluster info.- See Also:
-
-
Constructor Details
-
RouterResolver
-
-
Method Details
-
getFirstNamespace
Description copied from interface:OrderedResolverGet the first namespace based on this resolver approach.- Specified by:
getFirstNamespacein interfaceOrderedResolver- Parameters:
path- Path to check.loc- Federated location with multiple destinations.- Returns:
- First namespace out of the locations.
-
getSubclusterInfo
The implementation for getting desired subcluster mapping info.- Parameters:
membershipStore- Membership store the resolver queried from.- Returns:
- The map of desired type info.
-
chooseFirstNamespace
Choose the first namespace from queried subcluster mapping info.- Parameters:
path- Path to check.loc- Federated location with multiple destinations.- Returns:
- First namespace out of the locations.
-
getRpcServer
Get the Router RPC server.- Returns:
- Router RPC server. Null if not possible.
-
getMembershipStore
Get the Membership store.- Returns:
- Membership store.
-
getSubclusterMapping
Get subcluster mapping info.- Returns:
- The map of subcluster info.
-