Class PathLocation
java.lang.Object
org.apache.hadoop.hdfs.server.federation.resolver.PathLocation
A map of the properties and target destinations (name space + path) for
a path in the global/federated name space.
This data is generated from the @see MountTable records.
-
Constructor Summary
ConstructorsConstructorDescriptionPathLocation(String source, List<RemoteLocation> dest) Create a new PathLocation with default HASH order.PathLocation(String source, List<RemoteLocation> dest, DestinationOrder order) Create a new PathLocation.PathLocation(PathLocation other) Create a path location from another path.PathLocation(PathLocation other, String firstNsId) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionGet the default or highest priority location.Get the order for the destinations.Get the list of locations found in the mount table.Get the subclusters defined for the destinations.Get the source path in the global namespace for this path location.booleanCheck if this location supports multiple clusters/paths.static PathLocationprioritizeDestination(PathLocation base, String firstNsId) Return a path location with the prioritized destinations based on the current path location.toString()
-
Constructor Details
-
PathLocation
Create a new PathLocation.- Parameters:
source- Source path in the global name space.dest- Destinations of the mount table entry.order- Order of the locations.
-
PathLocation
Create a new PathLocation with default HASH order.- Parameters:
source- Source path in the global name space.dest- Destinations of the mount table entry.
-
PathLocation
Create a path location from another path.- Parameters:
other- Other path location to copy from.
-
PathLocation
Deprecated.Create a path location from another path with the destinations sorted.- Parameters:
other- Other path location to copy from.firstNsId- Identifier of the namespace to place first.
-
-
Method Details
-
prioritizeDestination
Return a path location with the prioritized destinations based on the current path location.- Parameters:
base- The base path location we'd like to prioritize on.firstNsId- Identifier of the namespace to place first.- Returns:
- path location with the prioritized destinations.
-
getSourcePath
Get the source path in the global namespace for this path location.- Returns:
- The path in the global namespace.
-
getNamespaces
Get the subclusters defined for the destinations.- Returns:
- Set containing the subclusters.
-
toString
-
hasMultipleDestinations
public boolean hasMultipleDestinations()Check if this location supports multiple clusters/paths.- Returns:
- If it has multiple destinations.
-
getDestinations
Get the list of locations found in the mount table. The first result is the highest priority path.- Returns:
- List of remote locations.
-
getDestinationOrder
Get the order for the destinations.- Returns:
- Order for the destinations.
-
getDefaultLocation
Get the default or highest priority location.- Returns:
- The default location.
-