Configurable, Tool@Private public class FsShell extends Configured implements Tool
| Modifier and Type | Class | 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 | Description |
|---|---|---|
protected CommandFactory |
commandFactory |
| Constructor | Description |
|---|---|
FsShell() |
Default ctor with no configuration.
|
FsShell(Configuration conf) |
Construct a FsShell with the given configuration.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Performs any necessary cleanup
|
Path |
getCurrentTrashDir() |
Returns the Trash object associated with this shell.
|
Path |
getCurrentTrashDir(Path path) |
Returns the current trash location for the path specified
|
protected FileSystem |
getFS() |
|
protected FsShell.Help |
getHelp() |
|
protected Trash |
getTrash() |
|
protected java.lang.String |
getUsagePrefix() |
|
protected void |
init() |
|
static void |
main(java.lang.String[] argv) |
main() has some simple utility methods
|
protected static FsShell |
newShellInstance() |
|
protected void |
registerCommands(CommandFactory factory) |
|
int |
run(java.lang.String[] argv) |
run
|
getConf, setConfclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConf, setConfprotected 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 java.io.IOException
java.io.IOExceptionprotected Trash getTrash() throws java.io.IOException
java.io.IOExceptionprotected FsShell.Help getHelp() throws java.io.IOException
java.io.IOExceptionprotected void init()
protected void registerCommands(CommandFactory factory)
public Path getCurrentTrashDir() throws java.io.IOException
java.io.IOException - upon errorpublic Path getCurrentTrashDir(Path path) throws java.io.IOException
path - to be deletedjava.io.IOException - raised on errors performing I/O.protected java.lang.String getUsagePrefix()
public int run(java.lang.String[] argv)
public void close()
throws java.io.IOException
java.io.IOException - upon errorpublic static void main(java.lang.String[] argv)
throws java.lang.Exception
argv - the command and its argumentsjava.lang.Exception - upon errorprotected static FsShell newShellInstance()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.