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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd a mount table entry or update if it exists.booleanaddMount(AddMountAttributes addMountAttributes) Add a mount table entry or update if it exists.static booleandumpStateStore(org.apache.hadoop.conf.Configuration conf, PrintStream output) Dumps the contents of the StateStore to stdout.intgenericRefresh(String[] argv, int i) voidlistMounts(String[] argv, int i) List mount points.static voidstatic StringNormalize a path for that filesystem.voidPrint the usage message.booleanremoveMount(String path) Remove mount point.intbooleanupdateMount(String[] parameters, int i) Update a mount table entry.Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Constructor Details
-
RouterAdmin
public RouterAdmin(org.apache.hadoop.conf.Configuration conf)
-
-
Method Details
-
main
- Throws:
Exception
-
printUsage
public void printUsage()Print the usage message. -
run
- Specified by:
runin interfaceorg.apache.hadoop.util.Tool- Throws:
Exception
-
addMount
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
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
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
Remove mount point.- Parameters:
path- Path to remove.- Returns:
- If the mount point was removed successfully.
- Throws:
IOException- If it cannot be removed.
-
listMounts
List mount points.- Parameters:
argv- Parameters of the path.i- Index in the parameters.- Throws:
IOException- If it cannot be listed.
-
genericRefresh
- 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
Normalize a path for that filesystem.- Parameters:
str- Path to normalize. The path doesn't have scheme or authority.- Returns:
- Normalized path.
-