@InterfaceAudience.Private public class FsShell extends Configured implements Tool
Modifier and Type | Class and Description |
---|---|
protected class |
FsShell.Help
Displays short usage of commands sans the long description
|
protected class |
FsShell.Usage
Display help for commands with their short usage and long description
|
Modifier and Type | Field and Description |
---|---|
protected CommandFactory |
commandFactory |
Constructor and Description |
---|
FsShell()
Default ctor with no configuration.
|
FsShell(Configuration conf)
Construct a FsShell with the given configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Performs any necessary cleanup
|
Path |
getCurrentTrashDir()
Returns the Trash object associated with this shell.
|
protected FileSystem |
getFS() |
protected Trash |
getTrash() |
protected void |
init() |
static void |
main(String[] argv)
main() has some simple utility methods
|
protected static FsShell |
newShellInstance() |
protected void |
registerCommands(CommandFactory factory) |
int |
run(String[] argv)
run
|
getConf, setConf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConf, setConf
protected CommandFactory commandFactory
public FsShell()
Configured.setConf(Configuration)
with a valid configuration prior
to running commands.public FsShell(Configuration conf)
run(String[])
conf
- the hadoop configurationprotected FileSystem getFS() throws IOException
IOException
protected Trash getTrash() throws IOException
IOException
protected void init() throws IOException
IOException
protected void registerCommands(CommandFactory factory)
public Path getCurrentTrashDir() throws IOException
IOException
- upon errorpublic void close() throws IOException
IOException
- upon errorpublic static void main(String[] argv) throws Exception
argv
- the command and its argumentsException
- upon errorprotected static FsShell newShellInstance()
Copyright © 2013 Apache Software Foundation. All rights reserved.