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 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.