org.apache.hadoop.fs.shell
Class Count
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.fs.shell.Command
org.apache.hadoop.fs.shell.Count
- All Implemented Interfaces:
- Configurable
public class Count
- extends Command
Count the number of directories, files, bytes, quota, and remaining quota.
Field Summary |
static java.lang.String |
DESCRIPTION
|
static java.lang.String |
NAME
|
static java.lang.String |
USAGE
|
Fields inherited from class org.apache.hadoop.fs.shell.Command |
args |
Constructor Summary |
Count(java.lang.String[] cmd,
int pos,
Configuration conf)
Constructor |
Method Summary |
java.lang.String |
getCommandName()
Return the command's name excluding the leading character - |
static boolean |
matches(java.lang.String cmd)
Check if a command is the count command |
protected void |
run(Path path)
Execute the command on the input path |
Methods inherited from class org.apache.hadoop.fs.shell.Command |
runAll |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
USAGE
public static final java.lang.String USAGE
- See Also:
- Constant Field Values
DESCRIPTION
public static final java.lang.String DESCRIPTION
Count
public Count(java.lang.String[] cmd,
int pos,
Configuration conf)
- Constructor
- Parameters:
cmd
- the count commandpos
- the starting index of the arguments
matches
public static boolean matches(java.lang.String cmd)
- Check if a command is the count command
- Parameters:
cmd
- A string representation of a command starting with "-"
- Returns:
- true if this is a count command; false otherwise
getCommandName
public java.lang.String getCommandName()
- Description copied from class:
Command
- Return the command's name excluding the leading character -
- Specified by:
getCommandName
in class Command
run
protected void run(Path path)
throws java.io.IOException
- Description copied from class:
Command
- Execute the command on the input path
- Specified by:
run
in class Command
- Parameters:
path
- the input path
- Throws:
java.io.IOException
- if any error occurs
Copyright © 2009 The Apache Software Foundation