@InterfaceAudience.Private public class DFSAdmin extends FsShell
FsShell.Help, FsShell.UsagecommandFactory| Constructor and Description |
|---|
DFSAdmin()
Construct a DFSAdmin object.
|
DFSAdmin(Configuration conf)
Construct a DFSAdmin object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
allowSnapshot(String[] argv)
Allow snapshot on a directory.
|
void |
disallowSnapshot(String[] argv)
Allow snapshot on a directory.
|
int |
fetchImage(String[] argv,
int idx)
Download the most recent fsimage from the name node, and save it to a local
file in the given directory.
|
int |
finalizeUpgrade()
Command to ask the namenode to finalize previously performed upgrade.
|
protected DistributedFileSystem |
getDFS() |
static void |
main(String[] argv)
main() has some simple utility methods.
|
int |
metaSave(String[] argv,
int idx)
Dumps DFS data structures into specified file.
|
int |
printTopology()
Display each rack and the nodes assigned to that rack, as determined
by the NameNode, in a hierarchical manner.
|
int |
refreshNodes()
Command to ask the namenode to reread the hosts and excluded hosts
file.
|
int |
refreshServiceAcl()
Refresh the authorization policy on the
NameNode. |
int |
refreshSuperUserGroupsConfiguration()
refreshSuperUserGroupsConfiguration
NameNode. |
int |
refreshUserToGroupsMappings()
Refresh the user-to-groups mappings on the
NameNode. |
void |
report()
Gives a report on how the FileSystem is doing.
|
int |
restoreFaileStorage(String arg)
Command to enable/disable/check restoring of failed storage replicas in the namenode.
|
int |
rollEdits() |
int |
run(String[] argv)
run
|
int |
saveNamespace()
Command to ask the namenode to save the namespace.
|
int |
setBalancerBandwidth(String[] argv,
int idx)
Command to ask the namenode to set the balancer bandwidth for all of the
datanodes.
|
void |
setSafeMode(String[] argv,
int idx)
Safe mode maintenance command.
|
close, getCurrentTrashDir, getFS, getTrash, init, newShellInstance, registerCommandsgetConf, setConfclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConf, setConfpublic DFSAdmin()
public DFSAdmin(Configuration conf)
protected DistributedFileSystem getDFS() throws IOException
IOExceptionpublic void report()
throws IOException
IOException - if the filesystem does not exist.public void setSafeMode(String[] argv, int idx) throws IOException
argv - List of of command line parameters.idx - The index of the command that is being processed.IOException - if the filesystem does not exist.public void allowSnapshot(String[] argv) throws IOException
argv - List of of command line parameters.IOExceptionpublic void disallowSnapshot(String[] argv) throws IOException
argv - List of of command line parameters.IOExceptionpublic int saveNamespace()
throws IOException
IOExceptionClientProtocol.saveNamespace()public int rollEdits()
throws IOException
IOExceptionpublic int restoreFaileStorage(String arg) throws IOException
IOExceptionClientProtocol.restoreFailedStorage(String arg)public int refreshNodes()
throws IOException
IOExceptionpublic int setBalancerBandwidth(String[] argv, int idx) throws IOException
argv - List of of command line parameters.idx - The index of the command that is being processed.IOExceptionpublic int fetchImage(String[] argv, int idx) throws IOException
argv - List of of command line parameters.idx - The index of the command that is being processed.IOExceptionpublic int finalizeUpgrade()
throws IOException
IOExceptionpublic int metaSave(String[] argv, int idx) throws IOException
argv - List of of command line parameters.idx - The index of the command that is being processed.IOException - if an error occurred while accessing
the file or path.public int printTopology()
throws IOException
IOException - If an error while getting datanode reportpublic int refreshServiceAcl()
throws IOException
NameNode.IOExceptionpublic int refreshUserToGroupsMappings()
throws IOException
NameNode.IOExceptionpublic int refreshSuperUserGroupsConfiguration()
throws IOException
NameNode.IOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.