Class MultipleDestinationMountTableResolver

java.lang.Object
org.apache.hadoop.hdfs.server.federation.resolver.MountTableResolver
org.apache.hadoop.hdfs.server.federation.resolver.MultipleDestinationMountTableResolver
All Implemented Interfaces:
FileSubclusterResolver, StateStoreCache

public class MultipleDestinationMountTableResolver extends MountTableResolver
Mount table resolver that supports multiple locations for each mount entry. The returned location contains prioritized remote paths from highest priority to the lowest priority. Multiple locations for a mount point are optional. When multiple locations are specified, both will be checked for the presence of a file and the nameservice for a new file/dir is chosen based on the results of a consistent hashing algorithm.

Does the Mount table entry for this path have multiple destinations?

  • No: Return the location
  • Yes: Return all locations, prioritizing the best guess from the consistent hashing algorithm.

It has multiple options to order the locations: HASH (default), LOCAL, RANDOM, and HASH_ALL.

The consistent hashing result is dependent on the number and combination of nameservices that are registered for particular mount point. The order of nameservices/locations in the mount table is not prioritized. Each consistent hash calculation considers only the set of unique nameservices present for the mount table location.