Command (Hadoop 1.2.1 API)
Date: 2013-07-22

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`protected String[]` | `args`

Constructor Summary
`protected` | `Command(Configuration conf)` Constructor

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 org.apache.hadoop.conf.Configured
`getConf, setConf`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### args

    protected String[] args

Constructor Detail

### Command

    protected Command(Configuration conf)

  Constructor

Method Detail

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation