org.apache.hadoop.fs.shell
Class Command
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.fs.shell.Command
- All Implemented Interfaces:
- Configurable
- Direct Known Subclasses:
- Count
public abstract class Command
- extends Configured
An abstract class for the execution of a file system command
Method Summary |
abstract String |
getCommandName()
Return the command's name excluding the leading character - |
protected abstract void |
run(Path path)
Execute the command on the input path |
int |
runAll()
For each source path, execute the command |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
args
protected String[] args
Command
protected Command(Configuration conf)
- Constructor
getCommandName
public abstract String getCommandName()
- Return the command's name excluding the leading character -
run
protected abstract void run(Path path)
throws IOException
- Execute the command on the input path
- Parameters:
path
- the input path
- Throws:
IOException
- if any error occurs
runAll
public int runAll()
- For each source path, execute the command
- Returns:
- 0 if it runs successfully; -1 if it fails
Copyright © 2009 The Apache Software Foundation