Class RandomResolver
java.lang.Object
org.apache.hadoop.hdfs.server.federation.resolver.order.RandomResolver
- All Implemented Interfaces:
OrderedResolver
Order the destinations randomly.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFirstNamespace(String path, PathLocation loc) Get a random name space from the path.
-
Constructor Details
-
RandomResolver
public RandomResolver()
-
-
Method Details
-
getFirstNamespace
Get a random name space from the path.- Specified by:
getFirstNamespacein interfaceOrderedResolver- Parameters:
path- Path ignored by this policy.loc- Federated location with multiple destinations.- Returns:
- Random name space.
-