@InterfaceAudience.Private public class DFSAdmin extends FsShell
FsShell.Help, FsShell.Usage
commandFactory
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, registerCommands
getConf, setConf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConf, setConf
public DFSAdmin()
public DFSAdmin(Configuration conf)
protected DistributedFileSystem getDFS() throws IOException
IOException
public 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.IOException
public void disallowSnapshot(String[] argv) throws IOException
argv
- List of of command line parameters.IOException
public int saveNamespace() throws IOException
IOException
ClientProtocol.saveNamespace()
public int rollEdits() throws IOException
IOException
public int restoreFaileStorage(String arg) throws IOException
IOException
ClientProtocol.restoreFailedStorage(String arg)
public int refreshNodes() throws IOException
IOException
public 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.IOException
public 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.IOException
public int finalizeUpgrade() throws IOException
IOException
public 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
.IOException
public int refreshUserToGroupsMappings() throws IOException
NameNode
.IOException
public int refreshSuperUserGroupsConfiguration() throws IOException
NameNode
.IOException
Copyright © 2013 Apache Software Foundation. All rights reserved.