Class HashFirstResolver
java.lang.Object
org.apache.hadoop.hdfs.server.federation.resolver.order.HashResolver
org.apache.hadoop.hdfs.server.federation.resolver.order.HashFirstResolver
- All Implemented Interfaces:
OrderedResolver
Variation of HashResolver that only uses the first level of the path.
-
Field Summary
Fields inherited from class org.apache.hadoop.hdfs.server.federation.resolver.order.HashResolver
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFirstNamespace(String path, PathLocation loc) Use the result from consistent hashing locator to prioritize the locations for a path.Methods inherited from class org.apache.hadoop.hdfs.server.federation.resolver.order.HashResolver
extractTempFileName
-
Constructor Details
-
HashFirstResolver
public HashFirstResolver()
-
-
Method Details
-
getFirstNamespace
Description copied from class:HashResolverUse the result from consistent hashing locator to prioritize the locations for a path.- Specified by:
getFirstNamespacein interfaceOrderedResolver- Overrides:
getFirstNamespacein classHashResolver- Parameters:
path- Path to check.loc- Federated location with multiple destinations.- Returns:
- First namespace based on hash.
-