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

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

# Class RouterFederationRename

java.lang.Object
org.apache.hadoop.hdfs.server.federation.router.RouterFederationRename

@Private @Unstable public class RouterFederationRename extends Object
Rename across router federation namespaces based on federation balance. Both the src and the dst coming from different namespaces need to have only one destination. Snapshot paths are not allowed. Users need write privilege of both src parent and dst parent to do router federation rename.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `RouterFederationRename.RouterRenameOption`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RouterFederationRename(RouterRpcServer rpcServer, org.apache.hadoop.conf.Configuration conf)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getRouterFederationRenameCount()`
  `boolean`
  `routerFedRename(String src, String dst, List<RemoteLocation> srcLocations, List<RemoteLocation> dstLocations)`
  Router federation rename across namespaces.

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### RouterFederationRename

    public RouterFederationRename(RouterRpcServer rpcServer, org.apache.hadoop.conf.Configuration conf)

- ## Method Details

  - ### routerFedRename

    public boolean routerFedRename(String src, String dst, List<RemoteLocation> srcLocations, List<RemoteLocation> dstLocations) throws IOException
    Router federation rename across namespaces.
    Parameters:
      `src` - the source path. There is no mount point under the src path.
      `dst` - the dst path.
      `srcLocations` - the remote locations of src.
      `dstLocations` - the remote locations of dst.
    Returns:
      true if rename succeeds.
    Throws:
      `IOException` - if rename fails.

  - ### getRouterFederationRenameCount

    public int getRouterFederationRenameCount()