RemoteLocation (Apache Hadoop HDFS-RBF 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.federation.resolver, class: RemoteLocation

Package org.apache.hadoop.hdfs.server.federation.resolver

# Class RemoteLocation

java.lang.Object
org.apache.hadoop.hdfs.server.federation.router.RemoteLocationContext
org.apache.hadoop.hdfs.server.federation.resolver.RemoteLocation

All Implemented Interfaces:
  `Comparable<RemoteLocationContext>`

public class RemoteLocation extends RemoteLocationContext
A location in a remote namespace consisting of a nameservice ID and a HDFS path (destination). It also contains the federated location (source).

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RemoteLocation(String nsId, String dPath, String sPath)`
  Create a new remote location.
  `RemoteLocation(String nsId, String nnId, String dPath, String sPath)`
  Create a new remote location pointing to a particular namenode in the namespace.
  `RemoteLocation(RemoteLocation remoteLocation, String path)`
  Use the Ns and Nn of a remote location and another path to create a new remote location pointing.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDest()`
  Destination in this location.
  `String`
  `getNameserviceId()`
  Returns an identifier for a unique namespace.
  `String`
  `getSrc()`
  Original source location.
  `String`
  `toString()`

  ### Methods inherited from class org.apache.hadoop.hdfs.server.federation.router.RemoteLocationContext

  `compareTo, equals, hashCode`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### RemoteLocation

    public RemoteLocation(String nsId, String dPath, String sPath)
    Create a new remote location.
    Parameters:
      `nsId` - Destination namespace.
      `dPath` - Path in the destination namespace.
      `sPath` - Path in the federated level.

  - ### RemoteLocation

    public RemoteLocation(String nsId, String nnId, String dPath, String sPath)
    Create a new remote location pointing to a particular namenode in the namespace.
    Parameters:
      `nsId` - Destination namespace.
      `nnId` - Destination namenode.
      `dPath` - Path in the destination namespace.
      `sPath` - Path in the federated level

  - ### RemoteLocation

    public RemoteLocation(RemoteLocation remoteLocation, String path)
    Use the Ns and Nn of a remote location and another path to create a new remote location pointing.
    Parameters:
      `remoteLocation` - A remoteLocation.
      `path` - Path in the destination namespace.

- ## Method Details

  - ### getNameserviceId

    public String getNameserviceId()
    Description copied from class: `RemoteLocationContext`
    Returns an identifier for a unique namespace.
    Specified by:
      `getNameserviceId` in class `RemoteLocationContext`
    Returns:
      Namespace identifier.

  - ### getDest

    public String getDest()
    Description copied from class: `RemoteLocationContext`
    Destination in this location. For example the path in a remote namespace.
    Specified by:
      `getDest` in class `RemoteLocationContext`
    Returns:
      Destination in this location.

  - ### getSrc

    public String getSrc()
    Description copied from class: `RemoteLocationContext`
    Original source location.
    Specified by:
      `getSrc` in class `RemoteLocationContext`
    Returns:
      Source path.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`