edu.umd.cloud9.example.simple
Class DemoWordCount
java.lang.Object
org.apache.hadoop.conf.Configured
edu.umd.cloud9.example.simple.DemoWordCount
- All Implemented Interfaces:
- Configurable, Tool
public class DemoWordCount
- extends Configured
- implements Tool
Simple word count demo. This Hadoop Tool counts words in flat text file, and
takes the following command-line arguments:
- [input-path] input path
- [output-path] output path
- [num-reducers] number of reducers
- Author:
- Jimmy Lin
|
Constructor Summary |
DemoWordCount()
Creates an instance of this tool. |
|
Method Summary |
static void |
main(String[] args)
Dispatches command-line arguments to the tool via the
ToolRunner. |
int |
run(String[] args)
Runs this tool. |
DemoWordCount
public DemoWordCount()
- Creates an instance of this tool.
run
public int run(String[] args)
throws Exception
- Runs this tool.
- Specified by:
run in interface Tool
- Throws:
Exception
main
public static void main(String[] args)
throws Exception
- Dispatches command-line arguments to the tool via the
ToolRunner.
- Throws:
Exception