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

Package org.apache.hadoop.hdfs.tools.federation

# Class RouterAdmin

java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hdfs.tools.federation.RouterAdmin

All Implemented Interfaces:
  `org.apache.hadoop.conf.Configurable`, `org.apache.hadoop.util.Tool`

@Private public class RouterAdmin extends org.apache.hadoop.conf.Configured implements org.apache.hadoop.util.Tool
This class provides some Federation administrative access shell commands.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RouterAdmin(org.apache.hadoop.conf.Configuration conf)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `addMount(String[] parameters, int i)`
  Add a mount table entry or update if it exists.
  `boolean`
  `addMount(AddMountAttributes addMountAttributes)`
  Add a mount table entry or update if it exists.
  `static boolean`
  `dumpStateStore(org.apache.hadoop.conf.Configuration conf, PrintStream output)`
  Dumps the contents of the StateStore to stdout.
  `int`
  `genericRefresh(String[] argv, int i)`
  `void`
  `listMounts(String[] argv, int i)`
  List mount points.
  `static void`
  `main(String[] argv)`
  `static String`
  `normalizeFileSystemPath(String str)`
  Normalize a path for that filesystem.
  `void`
  `printUsage()`
  Print the usage message.
  `boolean`
  `removeMount(String path)`
  Remove mount point.
  `int`
  `run(String[] argv)`
  `boolean`
  `updateMount(String[] parameters, int i)`
  Update a mount table entry.

  ### Methods inherited from class org.apache.hadoop.conf.Configured

  `getConf, setConf`

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

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

  ### Methods inherited from interface org.apache.hadoop.conf.Configurable

  `getConf, setConf`

- ## Constructor Details

  - ### RouterAdmin

    public RouterAdmin(org.apache.hadoop.conf.Configuration conf)

- ## Method Details

  - ### main

    public static void main(String[] argv) throws Exception
    Throws:
      `Exception`

  - ### printUsage

    public void printUsage()
    Print the usage message.

  - ### run

    public int run(String[] argv) throws Exception
    Specified by:
      `run` in interface `org.apache.hadoop.util.Tool`
    Throws:
      `Exception`

  - ### addMount

    public boolean addMount(String[] parameters, int i) throws IOException
    Add a mount table entry or update if it exists.
    Parameters:
      `parameters` - Parameters for the mount point.
      `i` - Index in the parameters.
    Returns:
      If it was successful.
    Throws:
      `IOException` - If it cannot add the mount point.

  - ### addMount

    public boolean addMount(AddMountAttributes addMountAttributes) throws IOException
    Add a mount table entry or update if it exists.
    Parameters:
      `addMountAttributes` - attributes associated with add mount point request.
    Returns:
      If the mount point was added.
    Throws:
      `IOException` - Error adding the mount point.

  - ### updateMount

    public boolean updateMount(String[] parameters, int i) throws IOException
    Update a mount table entry.
    Parameters:
      `parameters` - Parameters for the mount point.
      `i` - Index in the parameters.
    Returns:
      If it updated the mount point successfully.
    Throws:
      `IOException` - If there is an error.

  - ### removeMount

    public boolean removeMount(String path) throws IOException
    Remove mount point.
    Parameters:
      `path` - Path to remove.
    Returns:
      If the mount point was removed successfully.
    Throws:
      `IOException` - If it cannot be removed.

  - ### listMounts

    public void listMounts(String[] argv, int i) throws IOException
    List mount points.
    Parameters:
      `argv` - Parameters of the path.
      `i` - Index in the parameters.
    Throws:
      `IOException` - If it cannot be listed.

  - ### genericRefresh

    public int genericRefresh(String[] argv, int i) throws IOException
    Throws:
      `IOException`

  - ### dumpStateStore

    public static boolean dumpStateStore(org.apache.hadoop.conf.Configuration conf, PrintStream output) throws IOException
    Dumps the contents of the StateStore to stdout.
    Parameters:
      `conf` - the configuration.
      `output` - the print output stream.
    Returns:
      true if it was successful.
    Throws:
      `IOException` - if the State store is not available.

  - ### normalizeFileSystemPath

    public static String normalizeFileSystemPath(String str)
    Normalize a path for that filesystem.
    Parameters:
      `str` - Path to normalize. The path doesn't have scheme or authority.
    Returns:
      Normalized path.